Folgendes Problem: Ich verwende nginx und würde dort gern eine Subdomain einrichten ("neu.domain.net"). Ich habe einen A-Record und eine nginx-Konfiguration in sites-enabled angelegt, aber es funktioniert nicht wie gewünscht:
http://www.domain.net: funktioniert.
neu.domain.net: Umleitung auf www.
nww.domain.net (vertippt): 404.
Am DNS dürfte es also nicht liegen - eher an der Konfiguration. Schaut mal bitte drüber.
"www"-Config:
Code: Alles auswählen
server {
listen 80;
server_name domain.net;
root /var/www/domain.net/public;
index index.html index.php;
location ~ \.php$ {
#root html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_read_timeout 80;
fastcgi_param SCRIPT_FILENAME /var/www/domain.net/public/$fastcgi_script_name;
include fastcgi_params;
}
# make system internal
location /system {
internal;
}
# client php-fpm
location @php-fpm {
internal;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_read_timeout 80;
fastcgi_param SCRIPT_FILENAME /var/www/domain.net/public/$fastcgi_script_name;
include fastcgi_params;
}
location /system {
}
}
}
Code: Alles auswählen
server {
listen *:80;
server_name neu.domain.net;
root /var/www/new-site;
location /internal_data/ {
internal;
}
location /library/ {
internal;
}
index index.html index.htm index.php index.cgi index.pl index.xhtml;
location / {
try_files $uri $uri/ /index.php?$uri&$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
}
http://oi59.tinypic.com/dxbqtg.jpg
Ideen?
Eine Internetsuche nach diesem Problem führt leider nur andere Foren zu Tage, in denen ich die gleiche Frage bislang erfolglos gestellt habe. Kann doch nicht sein...!