diff --git a/apache-config.conf b/apache-config.conf new file mode 100644 index 0000000..04f5503 --- /dev/null +++ b/apache-config.conf @@ -0,0 +1,37 @@ +# Harheimer TC Website - HTTP VirtualHost +# Speichern unter: /etc/apache2/sites-available/harheimertc.tsschulz.de.conf + + + 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 + + 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] + + + # API-Routes für Nuxt Server (falls Server-Side Rendering verwendet wird) + ProxyPreserveHost On + ProxyPass /api/ http://localhost:3100/api/ + ProxyPassReverse /api/ http://localhost:3100/api/ + + # 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] +