我在aws ec2上的ubuntu 14.04服务器上安装了apache 2.4的joomla 3.x站点。 这一点很好,与url重写工作正常。 在释放nginx的端口80之前,我清除了所有的apache问题。 我对nginx没有特别的问题,即使我几乎没有开始使用它,这是第三次部署。 我用基本的东西逃脱了。 我跟着howtoforge的教程。 设置完成后 我意识到只索引页面加载正常,所有其他页面期望index.php? 在域名和可爱的url之间 stage.domain.com/bla/bla # doesn't work stage.domain.com/index.php?/bla/bla/ # works 我看到有这么多人遇到这个问题,但是他们要么直接在nginx中,要么直接在apache中托pipejoomla。 解决scheme的接近nginx在Apache主机joomla前面将无法正常工作,可能我没有正确的nginx理解,所以请忍受我。 以下是configuration: #/etc/nginx/site-enabled/stage.domain.com.vhost server { listen 80; server_name www.stage.domain.com stage.domain.com; root /var/www/html/vhosts/stage.domain.com/htdocs_april; index index.php index.html; location / { try_files $uri @proxy; } location ~* \.(js|css|jpg|jpeg|gif|png|svg|ico|pdf|html|htm)$ { expires 5d; } location @proxy { proxy_pass_header Server; […]
伙计们, 我试图用多个运行nginx的虚拟机来replace单个老化负载均衡器。 然而,在我安装了centos 7和nginx之后,我意识到心跳已经被弃用了。 所以我开始着眼于corosync和pcs来设置和pipe理HA群集。 我在集群中设置节点,并为每个我想使用的webapp添加一个虚拟ip的资源。 当我检查状态时,问题变得明显 [root@vlb1 nginx]# pcs status Cluster name: webapps Last updated: Thu Mar 5 21:27:03 2015 Last change: Thu Mar 5 16:43:22 2015 via cibadmin on vlb1.domain.com Stack: corosync Current DC: vlb2.domain.com (2) – partition with quorum Version: 1.1.10-32.el7_0.1-368c726 2 Nodes configured 2 Resources configured Online: [ vlb1.domain.com vlb2.domain.com ] […]
我有一个nginx服务器在我的服务器上代理apache,安装程序一直运行良好…直到昨天,当我发现,实际上,使用PHP脚本上传文件是非常缓慢的。 由于直接使用Apache(在另一个端口)上传仍然闪电般快,我得出的结论是nginx + apache二重奏是罪魁祸首。 问题是,我不知道如何解决它… 这是我的nginx.conf user apache; worker_processes 16; error_log /var/log/nginx/error.log; pid /var/run/nginx.pid; events { worker_connections 1024; } http { server_tokens off; include mime.types; default_type application/octet-stream; server_names_hash_bucket_size 128; sendfile on; tcp_nopush on; keepalive_timeout 65; tcp_nodelay on; gzip on; gzip_comp_level 5; gzip_http_version 1.0; gzip_min_length 0; gzip_types text/plain text/css image/x-icon application/x-javascript; gzip_vary on; client_header_timeout 10m; client_body_timeout […]
我想在Nginx + HVVM上运行Wordpress。 它在Apache + PHP上运行良好,但是当我激活Nginx时,网站中的大多数url都被重写为https。 这是我的网站configuration: server { root /var/www/claremacdonald.co.uk; index index.php index.html index.htm; server_name *.claremacdonald.co.uk; include hhvm.conf; location / { try_files $uri $uri/ /index.php?q=$uri&$args; } } hhvm.conf: location ~ \.(hh|php)$ { fastcgi_keep_conn on; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } /etc/hhvm/server.ini ; php options pid = /var/run/hhvm/pid ; hhvm specific […]
我几乎卡在这一点上。 我有一个网站,在8080端口上使用Padrino(A sinatra变种)服务于Mizuno(我认为是Jetty变种),Nginx在80/443监听,允许SSL代理。 该网站有一个login墙,用户login,然后被允许访问该网站之前,挑战。 每当我通过端口8080直接访问它,一切都按预期工作,但是,当我通过Nginx的时候,我只能到达挑战页面。 当我尝试将我的回应发布到挑战时,它会将我踢回login页面。 编辑:此外,当我login时,应用程序事实上login我正确。 如果我尝试通过端口8080直接访问下一页,在通过nginx启动后,它允许访问。 我的nginxconfiguration如下 server { listen 443; server_name secure.website.io; ssl_certificate ssl-bundle.crt; ssl_certificate_key website.key; ssl on; ssl_session_timeout 5m; ssl_protocols SSLv3 TLSv1; ssl_ciphers ALL:!aNULL:!ADH:!eNULL:!LOW:!EXP:RC4+RSA:+HIGH:+MEDIUM; ssl_prefer_server_ciphers on; location / { proxy_redirect off; proxy_set_header Host $http_host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-NginX-Proxy true; client_max_body_size 10m; client_body_buffer_size 128k; proxy_connect_timeout 90; proxy_send_timeout 90; […]
我的网站今天下午突然失败,以502回应每一个请求。 我在ELB后面设置了3个后端实例,每个都安装了Nginx。 起初,我怀疑后端实例有问题。 但根据ELB控制台中的状态描述,所有的实例都在服务中。 然后,我login到其中一个实例来查看Nginx和应用程序(与uwsgi )日志。 我发现那里实际上没有5xx错误,我可以看到请求以200 OK响应。 根据故障排除手册 ,502的原因可能是 来自实例的格式错误的响应或负载平衡器可能存在的问题。 我没有升级Nginx或uwsgi,所以我不认为我的后端已经返回了ELB无法理解的错误响应。 还有什么可能导致这样的情况? BTW: 我已经通过回滚到我的应用程序的旧版本而停止了502 ,即使重新部署了原始版本,它也继续工作,所以我想这是重新启动的工作。
我正在使用NGINX,并在浏览器的控制台中收到该错误。 我很沮丧 根据我的老板,我需要build立我所做的事情,但我仍然得到同样的错误。 这是完整的错误 OPTIONS https://backend.just4bettors.mobi/auth/login XMLHttpRequest cannot load https://backend.just4bettors.mobi/auth/login. No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'https://www.just4bettors.mobi' is therefore not allowed access. The response had HTTP status code 400. 这是configuration map $http_origin $cors_header { default ""; "~^https?://[^/]+\.just4bettors\.mobi(:[0-9]+)?$" "$http_origin"; } server { large_client_header_buffers 1 1K; listen 80; listen 443 ssl; server_name www.just4bettors.mobi […]
我nginx with pagespeed编译nginx with pagespeed并在/usr/lib/systemd/system/nginx.service nginx.service文件,但是当我尝试执行systemctl start nginx它只是挂起,nginx确实启动,但是systemctl挂起。 我必须使用ctrl+c出去。
CMS是Elxis ,它来自Joomla(PHP)的一个变体。 服务器正在使用PHP-FPM运行nGinx 所有的请求被logging和执行,最终,但! 当通过URL栏发起特定请求时,请求立即执行。 但是,当通过Ajax触发(通过jQuery),同样的请求有一个非常奇怪的行为。 即:首先请求(在媒体pipe理器上)查看图片的详细信息,将被解雇Ajax。 它被logging在浏览器上,但不在服务器上…不仅仅是…在一些好的40-50秒之后,请求出现在服务器上,然后立即作出响应。 所有以下请求立即执行,没有问题。 只有第一个是粗糙的 我遇到了麻烦,因为没有任何地方logging任何错误:除了第一个请求到达服务器的延迟之外,一切似乎都很正常。 这不是路由(网站已经启动,请求已经服务),这不是parsing(IP是在我的/ etc / hosts文件中)。 并添加一个小樱桃蛋糕上,尝试捕获服务器上的数据包(tcpdump)不产生输出:请求不在这里呢…在客户端也试过:没有输出 – 至less40秒.. 。 这一切都在浏览器上,开发者控制台显示没有错误,只是一个待处理的请求。 这有没有给任何人敲响钟声? The server: nginx version: nginx/1.6.2 PHP 5.6.7-1 (cli) PHP 5.6.7-1 (fpm-fcgi) jQuery版本1.11 客户端:试用Firefox 39(Ubuntu)和Chromium 41 注:我已经问过在stackoverflow相同的问题,因为我不能清楚地指出,如果它的代码或体系结构的责任…
我有一个Django的应用程序,它在Django的服务器上工作正常。 我只是configuration它与nginx和gunicorn。 除了其中一个外,几乎每个页面都可以正常工作。 这是一个非常大的页面,它由4个select(下拉)菜单组成,每个菜单1000个条目,每个菜单由guinicorn单个html文件发送。 Gunicorn只显示页面的一半。 有趣的是,没有nginx,gunicorn显示整个事情就好了。 尽pipe生成的页面不是静态的,但由于某种原因,nginx会中断页面。 这是我的nginxconfiguration: ec2-user@ip-172-31-44-39:~/mira_website> sudo cat /etc/nginx/sites-available/miraFrontEnd # This is example contains the bare minimum to get nginx going with # Gunicornservers. worker_processes 1; user ec2-user nogroup; # for systems with a "nogroup" # user nobody nobody; # for systems with "nobody" as a group instead # Feel free to […]