Setup Local Server To Serve multiple sites
To make your local machine in LAN serve as a server for other team members.
- $ sudo apt-get update
- $ sudo apt-get install php5-memcached memcached
- Edit the file : /etc/apache2/sites-enabled/000-default.conf
{Common File to update the Virtual Host Entries per user per port}
- Make an entry for virtual host :
<VirtualHost *:9090>
ServerAdmin webmaster@localhost
DocumentRoot /home/username/site_folder_nameErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined<Directory "/home/username/site_folder_name">
Options Indexes FollowSymLinks
AllowOverride all
Order deny,allow
Allow from all
Require all granted
</Directory>
</VirtualHost> - Now, Edit file /etc/apache2/ports.conf to make an entry :
Listen 9090
- Ensure you restart the apache server in order to take above changes effect.
sudo service apache2 restart
This Will help network to open the port so as to listen.. making it possible to browse the site over the network.
This far entry should basically be enough to browse the site at :
http://ip-address-of-machine:9090/
Where the files folder of machine is : /home/username/site_folder_name/
Add new comment