Files
harheimertc/apache-config.conf

42 lines
1.3 KiB
Plaintext

# Harheimer TC Website - HTTP VirtualHost
# Speichern unter: /etc/apache2/sites-available/harheimertc.tsschulz.de.conf
<VirtualHost *:80>
ServerName harheimertc.tsschulz.de
ServerAdmin admin@tsschulz.de
DocumentRoot /var/www/harheimertc/dist
ErrorLog ${APACHE_LOG_DIR}/harheimertc-error.log
CustomLog ${APACHE_LOG_DIR}/harheimertc-access.log combined
# SPA Fallback für Nuxt.js
<Directory "/var/www/harheimertc/dist">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
# Fallback für Client-Side Routing
RewriteEngine On
RewriteBase /
RewriteRule ^index\.html$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.html [L]
</Directory>
# API-Routes für Nuxt Server
ProxyPreserveHost On
ProxyPass /api/ http://localhost:3100/api/
ProxyPassReverse /api/ http://localhost:3100/api/
# Fallback für alle anderen Routen (SPA)
ProxyPass / http://localhost:3100/
ProxyPassReverse / http://localhost:3100/
# Redirect zu HTTPS (optional - kann später aktiviert werden)
# RewriteEngine On
# RewriteCond %{SERVER_NAME} =harheimertc.tsschulz.de
# RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>