I do all my application development locally, but for a while haven't needed to have two instances of locally running applications. In the past, I had setup apache to serve multiple local instances, but I hadn't written down the process.
First of all, alter /etc/hosts to add a line for your new site.
Then enable the sites you've created (run it once for each filename you've created):
First of all, alter /etc/hosts to add a line for your new site.
Then, alter the apache config: create a file per site in /etc/apache2/sites-available:127.0.0.1 localhost.localdomain localhost<br />127.0.0.2 localccc.localdomain localccc
<VirtualHost localhost>Also remove the contents of default: just empty it.
ServerName localhost
ServerAdmin webmaster@localhost
ServerSignature On
DocumentRoot /home/elements/htdocs/
<Directory>
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory home/elements/htdocs/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/apache2/error.log
CustomLog /var/log/apache2/access.log combined
LogLevel warn
</VirtualHost>
Then enable the sites you've created (run it once for each filename you've created):
a2ensite localhostFinally, restart the server
/etc/init.d/apacheAnd, as Gordon Ramsay would say... DONE.
No comments:
Post a Comment