mirror of
https://github.com/stefanpejcic/openpanel
synced 2025-06-26 18:28:26 +00:00
92 lines
2.4 KiB
Plaintext
92 lines
2.4 KiB
Plaintext
<VirtualHost *:80>
|
|
ServerName <DOMAIN_NAME>
|
|
ServerAlias www.<DOMAIN_NAME>
|
|
DocumentRoot /home/<USER>/<DOMAIN_NAME>
|
|
CustomLog /var/log/apache2/domlogs/<DOMAIN_NAME>.log combined
|
|
|
|
# <!-- BEGIN EXPOSED RESOURCES PROTECTION -->
|
|
<Directory /home/<USER>/<DOMAIN_NAME>>
|
|
<FilesMatch "\.(git|composer\.(json|lock)|auth\.json|config\.php|wp-config\.php|vendor)">
|
|
Require all denied
|
|
</FilesMatch>
|
|
</Directory>
|
|
# <!-- END EXPOSED RESOURCES PROTECTION -->
|
|
|
|
##### /phmyadmin on #####
|
|
ProxyRequests Off
|
|
ProxyPreserveHost On
|
|
|
|
<Proxy>
|
|
Require all granted
|
|
</Proxy>
|
|
|
|
ProxyPass /phpmyadmin http://localhost:8080/
|
|
ProxyPassReverse /phpmyadmin http://localhost:8080/
|
|
|
|
RequestHeader set X-Forwarded-Proto "https"
|
|
RequestHeader set X-Forwarded-Ssl on
|
|
##### /phpmyadmin end #####
|
|
|
|
<Directory /home/<USER>/<DOMAIN_NAME>>
|
|
Options Indexes FollowSymLinks
|
|
AllowOverride All
|
|
Require all granted
|
|
</Directory>
|
|
|
|
DirectoryIndex index.php index.html
|
|
|
|
<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
|
|
|
|
##### /phmyadmin on #####
|
|
ProxyRequests Off
|
|
ProxyPreserveHost On
|
|
|
|
<Proxy>
|
|
Require all granted
|
|
</Proxy>
|
|
|
|
ProxyPass /phpmyadmin http://localhost:8080/
|
|
ProxyPassReverse /phpmyadmin http://localhost:8080/
|
|
|
|
RequestHeader set X-Forwarded-Proto "https"
|
|
RequestHeader set X-Forwarded-Ssl on
|
|
##### /phpmyadmin end #####
|
|
|
|
<Directory /home/<USER>/<DOMAIN_NAME>>
|
|
Options Indexes FollowSymLinks
|
|
AllowOverride All
|
|
Require all granted
|
|
</Directory>
|
|
|
|
DirectoryIndex index.php index.html
|
|
|
|
<FilesMatch \.php$>
|
|
SetHandler "proxy:unix:/run/php/<PHP>-fpm.sock|fcgi://localhost"
|
|
</FilesMatch>
|
|
|
|
</VirtualHost>
|