Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2014
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. <VirtualHost *:80>
  2. ServerName not.configured
  3. DocumentRoot /var/www
  4. </VirtualHost>
  5.  
  6. <VirtualHost my.server.ip.address>
  7. DocumentRoot /home/user/public_html
  8. ServerName www.example.com
  9. ServerAlias example.com
  10. ErrorLog logs/example.com-error_log
  11. </VirtualHost>
  12.  
  13. <VirtualHost 192.168.1.1:80>
  14. DocumentRoot /dev/null
  15. ServerName *
  16. Redirect 404 /
  17. </VirtualHost>
  18.  
  19. # Uncomment the line below if not previously added in the file
  20. # RewriteEngine On
  21.  
  22. # Rule to redirect to the named host
  23. # Replace [xx.xx.xx.xx] woth your host's IP address
  24. # Replace [yourdomain.com] with your host's proper URL
  25. RewriteCond %{HTTP_HOST} ^xx.xx.xx.xx$
  26. RewriteRule (.*) http://yourdomain.com/$1 [R=301,L]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement