Skip to content

Instantly share code, notes, and snippets.

@shakyl333
Last active May 15, 2018 04:26
Show Gist options
  • Save shakyl333/8610fa602cc7ea9f4a608172339da2a4 to your computer and use it in GitHub Desktop.
Save shakyl333/8610fa602cc7ea9f4a608172339da2a4 to your computer and use it in GitHub Desktop.
code how to make virtual ip for project
Go to /etc/apache2/sites-available
create a file named as a host_name.conf (eg. dclub.dev.conf)
copy the below code inside the file
<VirtualHost *:80>
ServerAdmin admin@server.in
ServerName server.in
ServerAlias server.in
<Directory /var/www/html/[project]/public>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
DocumentRoot /var/www/html/project/public/
ErrorLog /var/www/html/project/error.log
CustomLog /var/www/html/project/access.log combined
</VirtualHost>
then add the host name and new ip address in /etc/hosts file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment