我遇到了nginx + php-fpm提供的Laravel问题,它只是返回一个空白页面。 nginx,php和laravel都没有logging任何错误。 当使用CLI运行index.php时,它将返回欢迎页面。 laravel栈未触及,所有错误报告/显示/日志logging打开。 下面是我的nginx虚拟主机: server { listen 801; server_name _; root /path/to/laravel/public; index index.html index.html index.php; charset utf-8; gzip on; gzip_http_version 1.1; gzip_disable "MSIE [1-6]."; gzip_vary on; gzip_proxied expired no-cache no-store private auth; gzip_comp_level 9; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; fastcgi_read_timeout 180; # serve static files directly location ~* \.(jpg|jpeg|gif|css|png|js|ico|html)$ { access_log […]
我在互联网上search了一段时间,我没有find解决scheme,所以我在这里问:我的问题是,为什么这个文件( /etc/init.d/nginx )不能执行? 我昨天跟着亚历克斯的教程,我遇到了一个问题。 一切工作,直到service nginx restart命令。 当我尝试运行这个命令,我会得到 nginx: You don't have permissions to execute nginx. 在Google上search了一段时间之后,我发现了一个潜在的答案,但是这已经在Alex的教程/演练中完成了: $ sudo chmod +x /etc/init.d/nginx 一些信息,如果你不想阅读教程: 我正在使用Nginx(正如您在阅读本文时所了解的那样) 它与Passenger一起安装,然后从头开始导入一个Nginx的初始化脚本和nginx.conf文件。 哦,我运行的是Debian,而不是Ubuntu,但那不应该是问题,或者? 所以,如果有人能帮助我,我将非常感激。 谢谢!
我正在尝试安装SSL我的nginx反向代理与authenticationssl密钥,但我得到这个消息时,当我尝试重新启动服务器: Restarting nginx: [emerg]: SSL_CTX_use_PrivateKey_file("/etc/nginx/conf.d/cert.key") failed (SSL: error:0906D06C:PEM routines:PEM_read_bio:no start line error:140B0009:SSL routines:SSL_CTX_use_PrivateKey_file:PEM lib) configuration file /etc/nginx/nginx.conf test failed 每个文件都是根目录:具有600个权限的根目录我已经testing了这些证书,并且通过以下网站进行validation: http ://ssltools.com/cert_key_match 在我的键中没有拖尾怪异的字符,每行有64个字符 这里是我的configuration文件 server { listen 443; server_name my.domain.com; ssl on; ssl_certificate conf.d/cert.pem; ssl_certificate_key conf.d/cert.key; location / { proxy_pass http://upstream1; proxy_redirect off; proxy_buffering off; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } […]
我已经configuration清漆听80端口和Nginx听8080.大约24小时的正常运行时间后,我的网站已经下降了22个小时。 我检查了一下,发现清漆不在80端口上。 当网站启动时: abc@abc:~$ sudo netstat -anp –tcp –udp | grep LISTEN tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 571/varnishd tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 376/nginx tcp 0 0 0.0.0.0:9171 0.0.0.0:* LISTEN 376/nginx tcp 0 0 publicip:6082 0.0.0.0:* LISTEN 569/varnishd tcp6 0 0 :::80 :::* LISTEN 376/nginx tcp6 0 0 ::1:6082 :::* LISTEN 569/varnishd 当网站停工时: […]
我需要帮助我的nginxconfiguration。 在这个configuration我有/ svn的位置,来到Apache的HTTP。 Apache是密码保护(基本authentication)当访问https://my.server.com/svn它显示了Apachelogin提示,但在它,我可以看到它试图访问http://127.0.0.1:81/ – 我需要隐藏这些信息。 另外,当我点击取消button,它会redirect到http://127.0.0.1:81/显示403。 所以我需要的是通过https服务,而不是向任何人展示我用于内部通信的端口。 成功login后,它也是http url和端口81,但是当我手动添加https,并删除端口81它也可以;) upstream subversion_hosts { server 127.0.0.1:81; } server { listen 80; ## listen for ipv4 listen [::]:80 default ipv6only=on; ## listen for ipv6 # Set appropriately for virtual hosting and to use server_name_in_redirect server_name server.name.com; server_name_in_redirect off; location / { rewrite ^(.*) https://server.name.com$1 permanent; } } […]
我需要运行Nginx的生产服务器上传进度扩展,唯一的问题是要做到这一点,我必须重新编译整个Nginx。 这意味着卸载repo Nginx,从源代码安装(以及随附的所有维护),并使用指向下载的上传进度源的模块选项进行编译。 然而,我确实通过安装nginx-extrasfind了一个不那么痛苦的方法,但是这是-V签名后安装: configuration参数:–prefix = / etc / nginx –conf-path = / etc / nginx / nginx.conf –error-log-path = / var / log / nginx / error.log –http-client-body -temp -path = / var / lib / nginx / body –http -f fastcgi-temp-path = / var / lib / nginx / fastcgi –http-log-path = / […]
我试图build立一个testingNginx负载平衡的环境。 到目前为止,我已经成功地configuration了一个负载平衡器nginx-balancer1和3个服务器来为网页nginx1, nginx2 & nginx3 。 nginx-balancer1根据分配给服务器的weight从nginx1, nginx2 or nginx3提供页面。 我现在需要弄清楚的是,我可以如何设置nginx-balancer1故障转移,就好像它是离线的,网页将离线:( 如果有人有任何信息或可以指出我在正确的方向,我将不胜感激。 谢谢
我在我的服务器上使用nginx进行请求转发。我有两个服务器块,一个用于主站点,另一个用于服务我的S3静态内容的服务器块。 server { listen 80; server_name abc.guru www.abc.guru; access_log off; error_log off; location / { proxy_pass http://127.0.0.1:8080; proxy_set_header X-Real-IP $remote_addr; proxy_set_header Host $host; proxy_redirect off; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_connect_timeout 90; proxy_send_timeout 90; proxy_read_timeout 90; client_max_body_size 10m; client_body_buffer_size 128k; proxy_buffer_size 4k; proxy_buffers 4 32k; proxy_busy_buffers_size 64k; } } # Server for S3 This accepts anything apart […]
我试图build立一个testingNginx负载平衡的环境。 到目前为止,我已经成功地configuration了一个负载平衡器nginx-balancer1和3个服务器来为网页nginx1, nginx2 & nginx3 。 我想根据访问者的IP来平衡负载。 我已经configuration了我的Nginx nginx-balancer1来使用Maxmind GeoIP国家数据。 所以这是我的configuration到上游服务器: # Check where the user is coming from server { location / { if ($geoip_city_continent_code = "EU") { proxy_pass http://ams1; } if ($geoip_city_continent_code = "NA") { proxy_pass http://sfo1; } if ($geoip_city_continent_code = "AS") { proxy_pass http://sgp1; } } } # Define upstream servers upstream […]
我已经在这里工作了好几个小时,没有成果。 现在我有三个域,例如domain1.com,domain2.org和domain3.net。 这些域都使用相同的IP地址。 域1和域2都有一个来自可信机构的单独的SSL证书。 domain3有一个自签名的证书,虽然不是很理想,但在这种情况下就足够了(我认为这不应该有任何区别)。 问题是,域访问正确的站点时,但通过IP地址访问时,domain3服务与域3的证书,我不能为我的生活弄清楚如何让它使用domain1来代替。 ..理想情况下,任何对IP的请求将被redirect到domain1.com。 任何帮助,将不胜感激。