Welcome to the Slackware Documentation Project

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
howtos:network_services:setup_apache [2018/12/23 21:48 (UTC)]
ellendhel [ENABLE PHP] Formatting
howtos:network_services:setup_apache [2018/12/23 21:50 (UTC)]
ellendhel [VIRTUAL HOSTS] Formatting
Line 140: Line 140:
 [[howtos:​network_services:​setup_apache_php_mysql|http://​docs.slackware.com/​howtos:​network_services:​setup_apache_php_mysql]] [[howtos:​network_services:​setup_apache_php_mysql|http://​docs.slackware.com/​howtos:​network_services:​setup_apache_php_mysql]]
  
-====== ​VIRTUAL HOSTS ====== +====== ​Virtual Hosts ====== 
-1) Edit /​etc/​httpd/​httpd.conf - Here is what you care about, change/​uncomment the following lines as necessary:+ 
 +Edit /​etc/​httpd/​httpd.conf - Here is what you care about, change/​uncomment the following lines as necessary:
  
 <​code>​vi /​etc/​httpd/​httpd.conf <​code>​vi /​etc/​httpd/​httpd.conf
Line 147: Line 148:
   Include /​etc/​httpd/​extra/​httpd-vhosts.conf</​code>​   Include /​etc/​httpd/​extra/​httpd-vhosts.conf</​code>​
  
-2) Edit /​etc/​httpd/​extra/​httpd-vhosts.conf - Here is what you care about, add one of these entries for each virtual host:+Edit /​etc/​httpd/​extra/​httpd-vhosts.conf - Here is what you care about, add one of these entries for each virtual host:
  
 <​code>​vi /​etc/​httpd/​extra/​httpd-vhosts.conf <​code>​vi /​etc/​httpd/​extra/​httpd-vhosts.conf
Line 169: Line 170:
   </​VirtualHost></​code>​   </​VirtualHost></​code>​
  
-3) Restart Apache+Restart Apache
 <​code>/​etc/​rc.d/​rc.httpd restart</​code>​ <​code>/​etc/​rc.d/​rc.httpd restart</​code>​
  
-**NOTE:** I run my vhosts as users so, the document roots are under /home/USER directories. ​Y**ou do not have to do this.** You can put the document roots anywhere you like.+**NOTE:** I run my vhosts as users so, the document roots are under /home/user directories. ​You do not have to do this. You can put the document roots anywhere you like. 
 + 
 +Example:
  
-EXAMPLE: \\ +/​srv/​www/​htdocs/​server1 \\ 
- /​srv/​www/​htdocs/​server1 \\ +/​srv/​www/​htdocs/​server2 \\
- /​srv/​www/​htdocs/​server2 ​\\ +
- ​etc... ​\\+
  
-**NOTE2:** These do not affect your default webserver setting in /​etc/​httpd/​httpd.conf. That web server instance will still work and be the default if a plain IP in used as the URL.+**NOTE 2:** These do not affect your default webserver setting in /​etc/​httpd/​httpd.conf. That web server instance will still work and be the default if a plain IP in used as the URL.
  
  

In Other Languages
QR Code
QR Code howtos:network_services:setup_apache (generated for current page)