Skip to content

Instantly share code, notes, and snippets.

@ansargondal
Last active February 18, 2020 13:28
Show Gist options
  • Save ansargondal/9a3fb4fd7b1a1358472e15fad4588700 to your computer and use it in GitHub Desktop.
Save ansargondal/9a3fb4fd7b1a1358472e15fad4588700 to your computer and use it in GitHub Desktop.
- Let's create an example site named [devdimensions.test]
- sudo a2enmod rewrite
- Now all the browsers are more secure and they don't allow .com domain to be served from localhost
- That's why we are using .test
- sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/devdimensions.conf
- sudo vi /etc/apache2/sites-available/devdimensions.conf
- Add the following Lines
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html/devdimensions/public
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/html/cdis/public>
AllowOverride All
</Directory>
</VirtualHost>
- Now we will edit the hosts file
- sudo vi /etc/hosts
- add the following line to that file.
- 127.0.0.1 devdimensions.test
- Now visit the devdimensions.test in the Browser and bam! You are good to go!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment