13.09.2016 Views

PHP and MySQL Web Development 4th Ed-tqw-_darksiderg

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

896 Appendix A Installing <strong>PHP</strong> <strong>and</strong> <strong>MySQL</strong><br />

| |<br />

| Thanks for using Apache & mod_ssl. Ralf S. Engelschall |<br />

| rse@engelschall.com |<br />

| www.engelschall.com |<br />

+---------------------------------------------------------------------+<br />

Now you can create a custom certificate.This option prompts you for location, company,<br />

<strong>and</strong> a couple of other things. For contact information, it makes sense to use real data.<br />

For other questions during the process, the default answer is fine:<br />

# make certificate TYPE=custom<br />

Now install Apache:<br />

# make install<br />

If everything goes well, you should see a message similar to this:<br />

+--------------------------------------------------------+<br />

| You now have successfully built <strong>and</strong> installed the |<br />

| Apache 2.2 HTTP server. To verify that Apache actually |<br />

| works correctly you now should first check the |<br />

| (initially created or preserved) configuration files |<br />

| |<br />

| /usr/local/apache2/conf/httpd.conf<br />

| |<br />

| <strong>and</strong> then you should be able to immediately fire up |<br />

| Apache the first time by running: |<br />

| |<br />

| /usr/local/apache2/bin/apachectl start<br />

| |<br />

| |<br />

| Thanks for using Apache. The Apache Group |<br />

| http://www.apache.org/ |<br />

+--------------------------------------------------------+<br />

Now it’s time to see whether Apache <strong>and</strong> <strong>PHP</strong> are working. However, you need to edit<br />

the httpd.conf file to add the <strong>PHP</strong> type to the configuration.<br />

httpd.conf File: Snippets<br />

Look at the httpd.conf file. If you have followed the previous instructions, your<br />

httpd.conf file will be located in the /usr/local/apache2/conf directory.The file has<br />

the addtype for <strong>PHP</strong> commented out.You should uncomment it at this time, so it looks<br />

like this:<br />

AddType application/x-httpd-php .php<br />

AddType application/x-httpd-php-source .phps

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!