[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revisionBoth sides next revision
howtos:setup_apache_php_mysql [2012/09/12 14:54 (UTC)] – created pavelhowtos:setup_apache_php_mysql [2012/09/12 19:07 (UTC)] – ADDED: php timezone change and httpd server name info. Left the formatting for the author to do. Moved SOURCES to the bottom. arfon
Line 2: Line 2:
 ====== Setup Apache, PHP and MySQL ====== ====== Setup Apache, PHP and MySQL ======
  
 +In order to configure your Slackware Linux box as a MySQL-PHP -ready web server, please follow these instructions:
  
-==== Sources ==== +  * Install the Apache (httpd), php and MySQL packages from the Slackware discs or Slackpkg.
-<!-- If you are copying information from another sourcethen specify that source --> +
-  * Original source: [[http://slackware-es.com/tutoriales/administracion/configurar-apache-php-y-mysql-en-slackware-linux]] +
-<!-- Authors are allowed to give credit to themselves! --> +
-  * Originally written by User [[wiki:user:pavel |Pavel E.]] +
- +
-\\ +
-In order to configure your Slackware Linux box as a MySQL-PHP -ready web server, please follow these instructions:+
  
 +  * Fix php time zone (many apps will complain about this if you don't do it). Edit '''/etc/httpd/php.ini''' and find the following line and uncomment it:
 +<code>
 +date.timezone = America/Chicago <--change to correct time zone
 +</code>
   * As the root user, open the '''/etc/httpd/httpd.conf''' Apache configuration file with your preferred text editor. Then, find the following line and uncomment it (delete the '#' character at the start of the line):   * As the root user, open the '''/etc/httpd/httpd.conf''' Apache configuration file with your preferred text editor. Then, find the following line and uncomment it (delete the '#' character at the start of the line):
  
Line 18: Line 16:
 Now your Apache will include the PHP module when it starts. Now your Apache will include the PHP module when it starts.
  
-\\+  * Set a server name (if your machine's IP doesn't resolve to a name). Edit the '''/etc/httpd/httpd.conf''' and uncomment the following line: 
 +<code> 
 +ServerName www.example.com:80 <--change www.example.com to an IP or your machine's name 
 +</code>
   * Optionally (but recommended), you can configure Apache to use an '''index.php''' file as your directory index. You just have to search the following line...:   * Optionally (but recommended), you can configure Apache to use an '''index.php''' file as your directory index. You just have to search the following line...:
 +  * Optionally 2, if you use Perl for web scripts, you may want to add '''index.pl''' also.
  
 <code> <IfModule dir_module> DirectoryIndex index.html </IfModule> </code> <code> <IfModule dir_module> DirectoryIndex index.html </IfModule> </code>
Line 52: Line 54:
  
 \\ \\
-<!-- Please do not modify anything belowexcept adding new tags.--> +==== Sources ==== 
-<!-- You must remove the tag-word "template" below before saving your new page -->+<!-- If you are copying information from another sourcethen specify that source --> 
 +  * Original source: [[http://slackware-es.com/tutoriales/administracion/configurar-apache-php-y-mysql-en-slackware-linux]] 
 +<!-- Authors are allowed to give credit to themselves! --> 
 +  * Originally written by User [[wiki:user:pavel |Pavel E.]]
 {{tag>howtos apache php}} {{tag>howtos apache php}}
 howtos:setup_apache_php_mysql ()