/etc/apache2/sites-enabled
Edit: /etc/apache2/sites-available/coeditor.conf (3273B)
# ADMIN
ServerName admin.coeditor.org
Redirect permanent / https://admin.coeditor.org/
RewriteEngine on
RewriteCond %{SERVER_NAME} =admin.coeditor.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
ServerName admin.coeditor.org
# DocumentRoot /var/www/coeditor.org/
ProxyPreserveHost On
ProxyPass / http://localhost:5574/
ProxyPassReverse / http://localhost:5574/
# WebSocket support for Vite HMR
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) ws://localhost:5574/$1 [P,L]
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/coeditor.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/coeditor.org/privkey.pem
ErrorLog ${APACHE_LOG_DIR}/coeditor_admin_error.log
CustomLog ${APACHE_LOG_DIR}/coeditor_admin_access.log combined
# GENERATOR
ServerName gen.coeditor.org
Redirect permanent / https://gen.coeditor.org/
RewriteEngine on
RewriteCond %{SERVER_NAME} =gen.coeditor.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
ServerName gen.coeditor.org
# DocumentRoot /var/www/coeditor.org/
ProxyPreserveHost On
ProxyPass / http://localhost:9021/
ProxyPassReverse / http://localhost:9021/
# WebSocket support for Vite HMR
RewriteEngine On
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) ws://localhost:9021/$1 [P,L]
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/coeditor.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/coeditor.org/privkey.pem
ErrorLog ${APACHE_LOG_DIR}/coeditor_gen_error.log
CustomLog ${APACHE_LOG_DIR}/coeditor_gen_access.log combined
# Include /etc/letsencrypt/options-ssl-apache.conf
# GENERATOR PREVIEW
ServerName site.coeditor.org
Redirect permanent / https://site.coeditor.org/
RewriteEngine on
RewriteCond %{SERVER_NAME} =site.coeditor.org
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
ServerName site.coeditor.org
DocumentRoot /var/www/coeditor.org/site/
Options -Indexes +FollowSymLinks
AllowOverride All
Require all granted
DirectoryIndex index.php index.html
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/coeditor.org/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/coeditor.org/privkey.pem
Header set X-Robots-Tag "noindex, nofollow, noarchive, nosnippet"
# Block xmlrpc.php
Require all denied
# Block sensitive files
Require all denied
ErrorLog ${APACHE_LOG_DIR}/coeditor_site_error.log
CustomLog ${APACHE_LOG_DIR}/coeditor_site_access.log combined
# Include /etc/letsencrypt/options-ssl-apache.conf