ssl - How to enable HTTPS with fastcgi-mono-server4 and nginx? -
i trying activate https on debian 7 server running nginx , fastcgi-mono-server4. use servicestack.
when use port 80 (non ssl) works fine. when change port 443 (ssl) error when try call server. error :
no application found unable find matching application request: host business.myserver.com port 443 request path /api physical path /var/www/business.myserver.com/api
here nginx.conf file:
server { listen 443 ssl; fastcgi_param https on; ssl_certificate /etc/nginx/ssl/nginx.crt; ssl_certificate_key /etc/nginx/ssl/nginx.key; server_name business.myserver.com; root /var/www/business.myserver.com; location /api { error_log /var/log/nginx/api-error.log; #add_header access-control-allow-origin "*"; add_header access-control-allow-methods "get, post, put, delete, options"; add_header access-control-max-age 1728000; add_header access-control-allow-headers "origin, content-type, authorization"; #add_header access-control-allow-credentials "true"; index index.html index.htm default.aspx default.aspx; fastcgi_index /api; fastcgi_pass 127.0.0.1:9000; fastcgi_param query_string $query_string; fastcgi_param request_method $request_method; fastcgi_param content_type $content_type; fastcgi_param content_length $content_length; fastcgi_param script_name $fastcgi_script_name; fastcgi_param request_uri $request_uri; fastcgi_param document_uri $document_uri; fastcgi_param document_root $document_root; fastcgi_param server_protocol $server_protocol; fastcgi_param gateway_interface cgi/1.1; fastcgi_param server_software nginx/$nginx_version; fastcgi_param remote_addr $remote_addr; fastcgi_param remote_port $remote_port; fastcgi_param server_addr $server_addr; fastcgi_param server_port $server_port; fastcgi_param server_name $server_name; fastcgi_param path_info ""; fastcgi_param script_filename $document_root$fastcgi_script_name; # hack: causing servicestack / asp.net -> mono -> fastcgi # encode 'deflate' again, force request disallow gzip or deflate fastcgi_param http_accept_encoding ""; } }
any or hint appreciated.
i had same problem in case came fastcgi-mono-server4
's configuration.
when run command specify config folder.
fastcgi-mono-server4 --appconfigdir '/var/www/mono-fastcgi ...'
and folder /var/www/mono-fastcgi
contains .webapp
configuration file. need make sure listen on port 443 there. example :
<apps> <web-application> <name>aspnet</name> <vhost>my/application.com</vhost> <vport>443</vport> <vpath>/</vpath> <path>/srv/www/aspnet</path> </web-application> </apps>
in case, <vport>
@ 80 , causing error.
Comments
Post a Comment