mirror of https://github.com/IoTcat/ushio-etc.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
69 lines
2.0 KiB
69 lines
2.0 KiB
server { |
|
listen 80; |
|
#listen [::]:80; |
|
server_name session.yimian.xyz; |
|
rewrite ^(.*)$ https://$host$1 permanent; |
|
} |
|
|
|
server { |
|
#listen 80; |
|
listen 443 ssl; |
|
server_name session.yimian.xyz; |
|
#root /home/www/session/; |
|
|
|
ssl_certificate /mnt/config/ssl/yimian.xyz/yimian.xyz.crt; |
|
ssl_certificate_key /mnt/config/ssl/yimian.xyz/yimian.xyz.key; |
|
|
|
|
|
location ^~ /php/ { |
|
root /home/www/session/; |
|
try_files $uri =404; |
|
fastcgi_pass php-fpm:9000; |
|
|
|
fastcgi_pass_request_body off; |
|
client_body_in_file_only clean; |
|
fastcgi_param REQUEST_BODY_FILE $request_body_file; |
|
|
|
fastcgi_index index.php; |
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
|
include fastcgi_params; |
|
fastcgi_keep_conn on; |
|
} |
|
|
|
location ^~ /websocket/ { |
|
|
|
# add_header Access-Control-Allow-Origin *; |
|
# add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; |
|
# add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; |
|
# if ($request_method = 'OPTIONS') { |
|
# return 204; |
|
# } |
|
|
|
proxy_pass http://session:21514/; |
|
proxy_read_timeout 300s; |
|
proxy_send_timeout 300s; |
|
proxy_set_header Host $host; |
|
proxy_set_header X-Real-IP $remote_addr; |
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; |
|
proxy_http_version 1.1; |
|
proxy_set_header Upgrade $http_upgrade; |
|
proxy_set_header Connection $connection_upgrade; |
|
} |
|
|
|
|
|
location / { |
|
|
|
# add_header Access-Control-Allow-Origin *; |
|
# add_header Access-Control-Allow-Methods 'GET, POST, OPTIONS'; |
|
# add_header Access-Control-Allow-Headers 'DNT,X-Mx-ReqToken,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'; |
|
# if ($request_method = 'OPTIONS') { |
|
# return 204; |
|
# } |
|
|
|
proxy_pass http://session:21513/; |
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|