ich bekomme einfach nicht gebacken das ich auf meine Subdoman zugreifen kann.
Ich will mein Nginx mit Haupt und Subdomains einrichten. Das Problem ist, die Hauptdomain erreiche ich, nur die Supdomain eben nicht egal welche Konfiguration ich wähle. Mal sehen was ich falsch mach! Logs werden zwar geschrieben aber nichts im Bezug das die Subdomain nicht erreichbar ist. Ich meiner Seite verzweifel gerade so`n bissel!
Code: Select all
Nginx.conf
user www;
worker_processes 8;
error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
events {
worker_connections 2048;
}
http {
include mime.types;
access_log /var/log/nginx/access.log;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
# GENERAL
ignore_invalid_headers on;
sendfile on;
server_name_in_redirect off;
server_tokens off;
charset utf-8;
client_max_body_size 128M;
client_body_buffer_size 128M;
geoip_country /opt/conf/GeoIP.dat;
#SSL
ssl_session_cache shared:SSL:10m;
ssl_session_timeout 10m;
ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM;
ssl_prefer_server_ciphers on;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
# TCP
tcp_nodelay off;
tcp_nopush on;
# Timeouts
client_body_timeout 65;
client_header_timeout 65;
keepalive_timeout 65 65;
send_timeout 65;
# Compression
gzip on;
gzip_buffers 256 8k;
gzip_comp_level 9;
gzip_http_version 1.0;
gzip_min_length 0;
gzip_types text/css text/javascript text/mathml text/plain text/xml application/x-javascript application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml;
gzip_vary on;
gzip_disable "MSIE [1-6]\.(?!.*SV1)";
# Pfad Website
include /usr/local/etc/nginx/leblogger/*.conf;
}Code: Select all
Hauptdomain
server {
listen 89.163.221.129:80;
listen 89.163.221.129:443 ssl;
listen [2001:4ba0:ffff:1:beef::2]:80 default ipv6only=on;
listen [2001:4ba0:ffff:1:beef::2]:443 ssl;
server_name leblogger.de www.leblogger.de;
root /usr/local/www/leblogger/;
index index.php;
client_max_body_size 5120M;
# Prevent Clickjacking
add_header X-Frame-Options "SAMEORIGIN";
# SSL Settings
### If you are using different names for your SSL certificate and key, change them below:
ssl_certificate /etc/ssl/ssl-bundle.crt;
ssl_certificate_key /etc/ssl/server.key;
add_header Strict-Transport-Security "max-age=16070400; includeSubdomains";
# Set the custom error pages
error_page 404 = /data/public/404.html;
error_page 403 = /data/public/404.html;
location / {
try_files $uri $uri/ =404;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/leblogger;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}Code: Select all
server {
listen 89.163.221.129:80;
listen 89.163.221.129:443 ssl;
server_name admin.leblogger.de;
root /usr/local/www/phpMyAdmin/;
index index.php;
client_max_body_size 5120M;
# Prevent Clickjacking
add_header X-Frame-Options "SAMEORIGIN";
# SSL Settings
### If you are using different names for your SSL certificate and key, change them below:
ssl_certificate /etc/ssl/ssl-bundle.crt;
ssl_certificate_key /etc/ssl/server.key;
add_header Strict-Transport-Security "max-age=16070400; includeSubdomains";
# Set the custom error pages
error_page 404 = /data/public/404.html;
error_page 403 = /data/public/404.html;
location / {
try_files $uri $uri/ =404;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/local/www/leblogger;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $request_filename;
include fastcgi_params;
}
}