mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
83 lines
2.3 KiB
Plaintext
83 lines
2.3 KiB
Plaintext
<VirtualHost *:8080>
|
|
ServerName <DOMAIN_NAME>
|
|
ServerAlias www.<DOMAIN_NAME>
|
|
DocumentRoot /home/<USER>/<DOMAIN_NAME>
|
|
CustomLog /var/log/apache2/domlogs/<DOMAIN_NAME>.log combined
|
|
|
|
<Directory /home/<USER>/<DOMAIN_NAME>>
|
|
Options Indexes FollowSymLinks
|
|
AllowOverride All
|
|
Require all granted
|
|
</Directory>
|
|
|
|
DirectoryIndex index.php index.html default_page.html
|
|
|
|
# Alias for default_page.html
|
|
Alias /default_page.html /etc/apache2/default_page.html
|
|
<Directory "/etc/apache2">
|
|
<FilesMatch "^default_page.html$">
|
|
Require all granted
|
|
Options -Indexes
|
|
SetEnvIf Request_URI ^/default_page.html allow_default_page
|
|
</FilesMatch>
|
|
</Directory>
|
|
|
|
<FilesMatch \.php$>
|
|
SetHandler "proxy:unix:/run/php/<PHP>-fpm.sock|fcgi://localhost"
|
|
</FilesMatch>
|
|
|
|
# Allow access to .well-known for Certbot
|
|
<Directory "/home/<USER>/<DOMAIN_NAME>/.well-known">
|
|
Options Indexes FollowSymLinks
|
|
AllowOverride None
|
|
Require all granted
|
|
</Directory>
|
|
|
|
Alias /.well-known /home/<USER>/<DOMAIN_NAME>/.well-known
|
|
|
|
</VirtualHost>
|
|
|
|
|
|
<VirtualHost *:443>
|
|
ServerName <DOMAIN_NAME>
|
|
ServerAlias www.<DOMAIN_NAME>
|
|
DocumentRoot /home/<USER>/<DOMAIN_NAME>
|
|
CustomLog /var/log/apache2/domlogs/<DOMAIN_NAME>.log combined
|
|
|
|
SSLEngine on
|
|
SSLCertificateFile /etc/apache2/ssl/cert.crt
|
|
SSLCertificateKeyFile /etc/apache2/ssl/cert.key
|
|
|
|
# TLS configuration
|
|
SSLProtocol TLSv1.2 TLSv1.3
|
|
SSLCipherSuite HIGH:!aNULL:!MD5
|
|
|
|
# Proxy configuration for Varnish
|
|
ProxyPass "/" "http://127.0.0.1:80/"
|
|
ProxyPassReverse "/" "http://127.0.0.1:80/"
|
|
ProxyPreserveHost On
|
|
|
|
<Directory /home/<USER>/<DOMAIN_NAME>>
|
|
Options Indexes FollowSymLinks
|
|
AllowOverride All
|
|
Require all granted
|
|
</Directory>
|
|
|
|
DirectoryIndex index.php index.html default_page.html
|
|
|
|
# Alias for default_page.html
|
|
Alias /default_page.html /etc/apache2/default_page.html
|
|
<Directory "/etc/apache2">
|
|
<FilesMatch "^default_page.html$">
|
|
Require all granted
|
|
Options -Indexes
|
|
SetEnvIf Request_URI ^/default_page.html allow_default_page
|
|
</FilesMatch>
|
|
</Directory>
|
|
|
|
<FilesMatch \.php$>
|
|
SetHandler "proxy:unix:/run/php/<PHP>-fpm.sock|fcgi://localhost"
|
|
</FilesMatch>
|
|
|
|
</VirtualHost>
|