Advertisement
twokay

Apache2 Webserver VHost config for port 443 (Gitea)

Jan 18th, 2021
565
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. <VirtualHost *:443>
  2. ServerName example.com
  3. ServerAdmin admin@example.com.media
  4. DocumentRoot /var/www/example.com/htdocs
  5. Protocols http/1.1
  6. ForensicLog /var/www/example.com/logs/forensic.log
  7. LogLevel warn
  8. ErrorLog /var/www/example.com/logs/apache2.error.ssl.log
  9. CustomLog /var/www/example.com/logs/apache2.access.ssl.log combined
  10.  
  11. KeepAliveTimeout 1
  12. ProxyPass "/" "unix:///var/www/example.com/services/gitea.sock|fcgi://example.com:51000/" nocanon
  13. ProxyPassReverse "/" "https://example.com/"
  14. ProxyPreserveHost On
  15. ProxyRequests off
  16.  
  17. AllowEncodedSlashes NoDecode
  18.  
  19. SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
  20. SetEnv proxy-chain-auth On
  21.  
  22. SSLEngine on
  23. SSLCertificateFile /root/ssl/example.com.crt
  24. SSLCertificateKeyFile /root/ssl/example.com.key
  25. SSLCertificateChainFile /root/ssl/example.com.crt
  26. </VirtualHost>
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement