SEARCH

Configure vhosts Apache for Drupal
admin
24.10.2012

Configure vhosts in Apache for Drupal installs with this simple guide. Edit httpd.conf and add the location of your vhosts files:

nano /etc/httpd/conf/httpd.conf

and insert at the end the following text:

NameVirtualHost *:80
Include /etc/httpd/conf/vhosts/

create the vhosts folder:

cd /etc
cd httpd
cd conf
mkdir vhosts
cd vhosts
nano site-url.conf

and add inside. Change accordingly your-email and your-url
 

ServerAdmin your-email
DocumentRoot /home/testsite/public_html
ServerName your-url
ServerAlias *.your -url
RewriteEngine On
RewriteOptions inherit
CustomLog /var/log/httpd/testsite.log combined


Options Indexes
AllowOverride All
order allow,deny
allow from all

Don't forget to restart Apache and you're done!

This is relevant for …

Drupal, cPanel, Apache

Post a comment