docker setup
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
# docker/nginx/default.conf
|
||||
|
||||
# HTTP → HTTPS
|
||||
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name nexus.local;
|
||||
|
||||
ssl_certificate /etc/nginx/certs/nexus.local.pem;
|
||||
ssl_certificate_key /etc/nginx/certs/nexus.local-key.pem;
|
||||
|
||||
ssl_protocols TLSv1.2 TLSv1.3;
|
||||
ssl_prefer_server_ciphers off;
|
||||
|
||||
root /var/www/html/public;
|
||||
index index.php;
|
||||
|
||||
# Logging
|
||||
access_log /var/log/nginx/nexus.access.log combined;
|
||||
error_log /var/log/nginx/nexus.error.log warn;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi_params;
|
||||
fastcgi_pass nexus-app:9000; # Containername vom PHP-FPM
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
}
|
||||
|
||||
# In der Nginx-Konfiguration von nexus.local
|
||||
location /build/assets/ {
|
||||
# Erlaubt explizit deine Subdomain
|
||||
add_header 'Access-Control-Allow-Origin' "$http_origin" always;
|
||||
add_header 'Access-Control-Allow-Methods' 'GET, OPTIONS' always;
|
||||
add_header 'Access-Control-Allow-Headers' 'Content-Type, X-Inertia' always;
|
||||
|
||||
# Falls du alle Subdomains von nexus.local erlauben willst:
|
||||
#
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user