Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- url : tuts.local
- folder site : /home/qnoy/tuts
- 1.enter directory site config apache2 on sites-available
- cd /etc/apache2/sites-available/
- 2.copy default config to something like host.domain.conf ex: tuts.local.conf
- cp 000-default.conf tuts.local.conf
- 3. edit this config file "tuts.local.conf"
- nano tuts.local.conf
- 4. put the script below or u can change like this
- #[script tuts.local.conf ]
- <VirtualHost tuts.local:80> #<- url site:port
- ServerName tuts.local #<- url site
- ServerAdmin webmaster@localhost #<- email info signature site
- DocumentRoot /home/qnoy/tuts #<- location root site folder
- ErrorLog ${APACHE_LOG_DIR}/error_tuts.local.log #<- error log file after edit with site name
- CustomLog ${APACHE_LOG_DIR}/access_tuts.local.log combined #<- access log file after edit with site name
- </VirtualHost>
- #[end script tuts.local.conf ]
- 5. back [command : ..] or enter to dir apache2
- cd /etc/apache2/
- 6.edit file apache2.conf
- nano apache2.conf
- 7.search like "Directory /var/www"
- #[looks like]
- <Directory /var/www/>
- Options Indexes FollowSymLinks
- AllowOverride None
- Require all granted
- </Directory> #this is
- #[end]
- 8.put the script below after "#this is (look above)"
- <Directory /home/qnoy/tuts>
- Options Indexes FollowSymLinks
- AllowOverride all
- Require all granted
- </Directory>
- description :
- /home/qnoy/tuts = location root site folder
- 9.edit file "hosts" on /etc/hosts
- nano /etc/hosts
- 10. enter directory site config apache2 again
- cd /etc/apache2/sites-available/
- 11. enable this site with command "a2ensite file_config.config"
- a2ensite tuts.local.conf
- 12. restart or reload apache2
- /etc/init.d/apache2 restart
- 13 . optional
- chown -R qnoy:www-data /home/qnoy/tuts
- chmod -R 775 /home/qnoy/tuts
- 13. open internet browser type
- tuts.local/
Advertisement
Add Comment
Please, Sign In to add comment