[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 revision
Previous revision
howtos:setup_apache_php_mysql [2012/09/12 14:54 (UTC)] – created pavelhowtos:setup_apache_php_mysql [2012/09/25 04:42 (UTC)] (current) – deleted page - moved to the howts:network_services section mfillpot
Line 1: Line 1:
-<!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> 
-====== Setup Apache, PHP and MySQL ====== 
  
- 
-==== Sources ==== 
-<!-- If you are copying information from another source, then 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: 
- 
-  * 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): 
- 
-<code>Include /etc/httpd/mod_php.conf</code> 
- 
-Now your Apache will include the PHP module when it starts. 
- 
-\\ 
-  * 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...: 
- 
-<code> <IfModule dir_module> DirectoryIndex index.html </IfModule> </code> 
- 
-... and change it by: 
- 
-<code> <IfModule dir_module> DirectoryIndex index.html index.php </IfModule> </code> 
- 
-Please note the '''index.php''' part added. You can now __save__ and close your '''/etc/httpd/httpd.conf''' file and restart your Apache server in order to have your modifications applied. As root, execute:  
- 
-<code bash>apachectl restart</code> 
- 
-\\ 
-  * If you want your Apache server to start automatically when you start your box, you can change the permissions of the '''/etc/rc.d/rc.httpd''' file. Execute the following command as root: 
- 
-<code bash>chmod 755 /etc/rc.d/rc.httpd</code> 
- 
-Now your Apache server will start automatically when your system boots. 
- 
-\\ 
-In order to configure your MySQL installation, please see the [[howtos:install_mysql_on_slackware|Install MySQL On Slackware]] doc. 
- 
- 
-== Final Considerations == 
-  * Normally you would want to test your recent changes in order to know if they have worked. After restarting Apache, create a '''test.php''' file on your '''/var/www/htdocs/''' directory with the following: 
- 
-<code php> 
-<?php phpinfo(); ?> 
-</code> 
- 
-Now you can open your favorite web browser to the following URL: http://localhost/test.php . If you your PHP installation's settings are displayed, then you have configured your Apache correctly, otherwise, please re-check this documentation (getting sure you have followed every step correctly), or contact us at ##slackware on FreeNode. 
- 
-\\ 
-<!-- Please do not modify anything below, except adding new tags.--> 
-<!-- You must remove the tag-word "template" below before saving your new page --> 
-{{tag>howtos apache php}} 
 howtos:setup_apache_php_mysql ()