Advertisement
Guest User

Apache Config

a guest
Nov 17th, 2011
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.13 KB | None | 0 0
  1. In ports.conf:
  2.  
  3. NameVirtualHost *:80
  4. Listen 80
  5.  
  6. In sites-enabled/000_default:
  7.  
  8. <VirtualHost *:80>
  9. ServerAdmin webmaster@localhost
  10. RewriteEngine on
  11. RewriteRule (.*) http://mysite.com [R]
  12.  
  13. DocumentRoot /var/www/
  14. <Directory />
  15. Options FollowSymLinks
  16. AllowOverride None
  17. </Directory>
  18. <Directory /var/www/>
  19. Options Indexes FollowSymLinks MultiViews
  20. AllowOverride None
  21. Order allow,deny
  22. allow from all
  23. </Directory>
  24.  
  25. ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
  26. <Directory "/usr/lib/cgi-bin">
  27. AllowOverride None
  28. Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
  29. Order allow,deny
  30. Allow from all
  31. </Directory>
  32.  
  33. ErrorLog ${APACHE_LOG_DIR}/error.log
  34.  
  35. # Possible values include: debug, info, notice, warn, error, crit,
  36. # alert, emerg.
  37. LogLevel warn
  38.  
  39. CustomLog ${APACHE_LOG_DIR}/access.log combined
  40.  
  41. Alias /doc/ "/usr/share/doc/"
  42. <Directory "/usr/share/doc/">
  43. Options Indexes MultiViews FollowSymLinks
  44. AllowOverride None
  45. Order deny,allow
  46. Deny from all
  47. Allow from 127.0.0.0/255.0.0.0 ::1/128
  48. </Directory>
  49.  
  50. </VirtualHost>
  51.  
  52. In sites-enabled/mysite
  53.  
  54. <VirtualHost *:80>
  55. ServerAdmin webmaster@localhost
  56. ServerName mysite.com
  57. ServerAlias www.mysite.com
  58.  
  59. DocumentRoot /var/www/mysite
  60. <Directory />
  61. Options FollowSymLinks
  62. AllowOverride None
  63. </Directory>
  64. <Directory /var/www/mysite/>
  65. Options FollowSymLinks MultiViews
  66. AllowOverride None
  67. Order allow,deny
  68. allow from all
  69. </Directory>
  70.  
  71. ErrorLog /var/log/apache2/mysite_error.log
  72.  
  73. # Possible values include: debug, info, notice, warn, error, crit,
  74. # alert, emerg.
  75. LogLevel warn
  76.  
  77. CustomLog /var/log/apache2/mysite_access.log combined
  78.  
  79. </VirtualHost>
  80.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement