에 나는이에 대한 몇 가지 대답을 읽어 http://localhost
재 작성에 http https를 Nginx에
https://localhost
에 다시하려고하고, 난 내 로컬 서버에 그것을 시도 할 때 작동합니다.
server {
listen 80;
rewrite ^(.*) https://$server_name$request_uri permanent;
[...]
}
을하지만이 같은 IP와 함께 다른 컴퓨터에서 올 때 : 나는이 라인을 함께 할 xxx.xxx.xxx.xxx:8086
는 https://localhost
날 리디렉션 나는 그것을 원하지 않는다.
그래서, 나는이 같은 시도 :
server {
listen 80;
rewrite ^(.*) https://$server_name$request_uri permanent;
[...]
}
또 다른 문제 : 8086 : 내 않고 https://xxx.xxx.xxx.xxx
날 리디렉션! 그게 내가 원하는 것도 아니에요 ...
누구나 나를위한 해결책이 있습니까?
고맙습니다.
Maxime.
편집 :
내 설정 : 내 응원의 설정에
server {
listen 80;
#rewrite ^(.*) https://$host:8086$request_uri permanent;
root /var/www;
rewrite^https://$server_name$request_uri permanent;
index index.php index.html index.htm;
location/{
try_files $uri $uri/ /index.html;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
include fastcgi_params;
}
}
server {
listen 443 ssl;
server_name localhost;
ssl on;
ssl_certificate ./cert.crt;
ssl_certificate_key ./cert.key;
ssl_session_cache shared:SSL:1m;
ssl_session_timeout 5m;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
root /var/www;
index index.php index.html index.htm;
location/{
try_files $uri $uri/ /index.html;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name;
include fastcgi_params;
}
}
,이 서버의 포트 리디렉션이 동일한 포트에서 HTTPS에 HTTP를 리디렉션 할 수 없습니다 8086
을 내가 그렇게 이미하고 있습니다. 하지만 그것은 잘못 리디렉션됩니다 :/the : 8086 여기 다시는 없습니다! – Maxouhell
@maxouhell, : 8086은 전혀 리디렉션되지 않아야합니다. 포트 80 만 ... 설정에서 복사하여 붙여 넣을 수 있습니까? – Si289
나는 내 첫 게시물에 그것을 해왔다. 도와 줘서 고마워. – Maxouhell