apache.conf 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <VirtualHost *:80>
  2. ServerAdmin webmaster@example.com
  3. DocumentRoot "/www/wwwroot/naitokoa.com"
  4. ServerName 3c6e4c79.naitokoa.com
  5. ServerAlias naitokoa.com www.naitokoa.com
  6. #errorDocument 404 /404.html
  7. ErrorLog "/www/wwwlogs/naitokoa.com-error_log"
  8. CustomLog "/www/wwwlogs/naitokoa.com-access_log" combined
  9. Alias / "/var/wwwroot/naitokoa.com/public/"
  10. RewriteEngine On
  11. # rewrite rule to prevent proxy exploit
  12. RewriteCond %{REQUEST_URI} !^$
  13. RewriteCond %{REQUEST_URI} !^/
  14. RewriteRule .* - [R=400,L]
  15. RewriteCond %{REQUEST_URI} !^/(public)(.*)$
  16. RewriteRule ^(/.*)$ http://localhost:3010$1 [P]
  17. ProxyPassReverse / http://localhost:3010
  18. #DENY FILES
  19. <Files ~ (\.user.ini|\.htaccess|\.git|\.svn|\.project|LICENSE|README.md)$>
  20. Order allow,deny
  21. Deny from all
  22. </Files>
  23. #PHP
  24. <FilesMatch \.php$>
  25. SetHandler "proxy:unix:/tmp/php-cgi-80.sock|fcgi://localhost"
  26. </FilesMatch>
  27. #PATH
  28. <Directory "/www/wwwroot/naitokoa.com">
  29. SetOutputFilter DEFLATE
  30. Options FollowSymLinks
  31. AllowOverride All
  32. Require all granted
  33. DirectoryIndex index.php index.html index.htm default.php default.html default.htm
  34. </Directory>
  35. <Directory "/var/wwwroot/naitokoa.com/public">
  36. Options Indexes MultiViews FollowSymLinks
  37. AllowOverride None
  38. Order allow,deny
  39. Allow from all
  40. </Directory>
  41. </VirtualHost>