그래서 나는 현재 웹 사이트에서 URL을 밝힐 수 없습니다. 그래서 나는이 질문에 대해 www.example.com이라고 부를 것이다.Nginx 리디렉션 없음 없음 www
내 사이트로 이동하여 HTTPS :: //www.example.com으로 리디렉션하려고합니다. 그러나 이것은 그렇지 않습니다. http를 https로 리디렉션하면서 작동하도록했습니다.
example.com으로 이동하면 www.example.com으로 리디렉션되지만 example.com/videos와 같은 다른 경로를 시도하면 https://www.example.com 대신 https://example.com/videos으로 리디렉션됩니다. 누군가가 도와 수 있다면
server{
listen 80;
server_name example.com www.example.com;
rewrite ^/(.*) https://www.example.com/$1 permanent;
}
server {
listen 443 ssl;
server_name example.com www.thevirtualpornwebsite.com;
root /var/www/example_folder/public;
index index.php index.html index.htm index.nginx-debian.html;
ssl_certificate /home/example_user/example.com.chained.crt;
ssl_certificate_key /home/example_user/example.com.key;
ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
ssl_prefer_server_ciphers on;
ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
location/{
rewrite ^/(.*)/$ /$1 permanent;
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
}
것은 그 좋은 것 :
여기 내의 nginx 설정 파일입니다!