Last active
February 18, 2020 13:28
-
-
Save ansargondal/9a3fb4fd7b1a1358472e15fad4588700 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 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