yuptahtguy

incorrect-apache2-subpath-vhost-config

Oct 3rd, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.73 KB | None | 0 0
  1. # cat /etc/apache2/sites-enabled/900-example.com.vhost
  2.  
  3. <Directory /var/www/example.com>
  4. AllowOverride None
  5. Require all denied
  6. </Directory>
  7.  
  8. <VirtualHost *:80>
  9.  
  10.  
  11. DocumentRoot /var/www/clients/client5/web6/web
  12.  
  13. ServerName example.com
  14. ServerAlias *.example.com
  15. ServerAlias tester1.example.com
  16. ServerAlias *.tester1.git.example.com tester1.git.example.com
  17. ServerAlias git.example.com.example.com
  18. ServerAdmin [email protected]
  19.  
  20.  
  21. ErrorLog /var/log/ispconfig/httpd/example.com/error.log
  22.  
  23. Alias /error/ "/var/www/example.com/web/error/"
  24. ErrorDocument 400 /error/400.html
  25. ErrorDocument 401 /error/401.html
  26. ErrorDocument 403 /error/403.html
  27. ErrorDocument 404 /error/404.html
  28. ErrorDocument 405 /error/405.html
  29. ErrorDocument 500 /error/500.html
  30. ErrorDocument 502 /error/502.html
  31. ErrorDocument 503 /error/503.html
  32.  
  33.  
  34. <Directory /var/www/example.com/web>
  35. # Clear PHP settings of this website
  36. <FilesMatch ".+\.ph(p[345]?|t|tml)$">
  37. SetHandler None
  38. </FilesMatch>
  39. Options +SymlinksIfOwnerMatch
  40. AllowOverride All
  41. Require all granted
  42. </Directory>
  43. <Directory /var/www/clients/client5/web6/web>
  44. # Clear PHP settings of this website
  45. <FilesMatch ".+\.ph(p[345]?|t|tml)$">
  46. SetHandler None
  47. </FilesMatch>
  48. Options +SymlinksIfOwnerMatch
  49. AllowOverride All
  50. Require all granted
  51. </Directory>
  52.  
  53.  
  54.  
  55.  
  56. # suexec enabled
  57. <IfModule mod_suexec.c>
  58. SuexecUserGroup web2 client1
  59. </IfModule>
  60. <IfModule mod_fastcgi.c>
  61. <Directory /var/www/clients/client5/web6/cgi-bin>
  62. Require all granted
  63. </Directory>
  64. <Directory /var/www/example.com/web>
  65. <FilesMatch "\.php[345]?$">
  66. <If "-f '%{REQUEST_FILENAME}'">
  67. SetHandler php-fcgi
  68. </If>
  69. </FilesMatch>
  70. </Directory>
  71. <Directory /var/www/clients/client5/web6/web>
  72. <FilesMatch "\.php[345]?$">
  73. <If "-f '%{REQUEST_FILENAME}'">
  74. SetHandler php-fcgi
  75. </If>
  76. </FilesMatch>
  77. </Directory>
  78. Action php-fcgi /php-fcgi virtual
  79. Alias /php-fcgi /var/www/clients/client5/web6/cgi-bin/php-fcgi-*-80-example.com
  80. FastCgiExternalServer /var/www/clients/client5/web6/cgi-bin/php-fcgi-*-80-example.com -idle-timeout 300 -socket /var/lib/php7.3-fpm/web2.sock -pass-header Authorization -pass-header Content-Type
  81. </IfModule>
  82. <IfModule mod_proxy_fcgi.c>
  83. #ProxyPassMatch ^/(.*\.php[345]?(/.*)?)$ unix:///var/lib/php7.3-fpm/web2.sock|fcgi://localhost//var/www/clients/client5/web6/web/$1
  84. <Directory /var/www/clients/client5/web6/web>
  85. <FilesMatch "\.php[345]?$">
  86. <If "-f '%{REQUEST_FILENAME}'">
  87. SetHandler "proxy:unix:/var/lib/php7.3-fpm/web2.sock|fcgi://localhost"
  88. </If>
  89. </FilesMatch>
  90. </Directory>
  91. </IfModule>
  92.  
  93.  
  94.  
  95. # add support for apache mpm_itk
  96. <IfModule mpm_itk_module>
  97. AssignUserId web2 client1
  98. </IfModule>
  99.  
  100. <IfModule mod_dav_fs.c>
  101. # Do not execute PHP files in webdav directory
  102. <Directory /var/www/clients/client5/web6/webdav>
  103. <ifModule mod_security2.c>
  104. SecRuleRemoveById 960015
  105. SecRuleRemoveById 960032
  106. </ifModule>
  107. <FilesMatch "\.ph(p3?|tml)$">
  108. SetHandler None
  109. </FilesMatch>
  110. </Directory>
  111. DavLockDB /var/www/clients/client5/web6/tmp/DavLock
  112. # DO NOT REMOVE THE COMMENTS!
  113. # IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
  114. # WEBDAV BEGIN
  115. # WEBDAV END
  116. </IfModule>
  117.  
  118.  
  119.  
  120. #DP Edit: Gitea Apache Reverse Proxy Via ISPC GUI
  121. ProxyPreserveHost On
  122. ProxyRequests off
  123. AllowEncodedSlashes NoDecode
  124. SSLProxyEngine on
  125. ProxyPass / http://127.0.0.1:3000/ nocanon
  126. ProxyPassReverse / http://127.0.0.1:3000/
  127.  
  128.  
  129. </VirtualHost>
  130.  
  131.  
Advertisement
Add Comment
Please, Sign In to add comment