i dunno if any one here can help (im hoping some one can) but basically i have installed nginx onto a freebsd server, added 2 domains to this webserver.
the first domain works correctly and loads up all php files etc how ever the second domain wont.
its pretty confusing as both configs are the same, if i comment out the working config the non working one will work perfect.
for some reason virtual host which i create,i always get error 403.I tried many things,from chowing to various owners and other,until i found temporal solution-i created copy of html directory(which is created during install and which working fine) called bla,and pointed domain to bla directory and then it worked.But this is problematic since all files are in home directory,which means i will need to copy all of them into /usr/local/nginx/.
Also what is problem is with alias,i have a script which is located at /home/ also and that again causing that 403 error since it's not located in /usr/local/nginx.I tried to make it work by creating symbolic link but that didn't worked.Seems only solution would be to copy script to nginx directory which will require a lot of file editing because of location change.
Also there is a problem with domain alias-*.domain.com not working at all,nor 1.domain.com.If i have *.domain.com instead domain.com,then i get 404 error on directory alias,while it works on www.
How do i enable hotlink blank protection for images,where images can be loaded only by specified domains and direct access?
And how to rewrite following apache rule:
RewriteEngine on RewriteRule ^directory/(.*)$ /st/st.php?%{QUERY_STRING}
I using latest stable version,and i think same problems was on latest
legacy version too.
Here is my server section of domain: server { listen 81; server_name www.domain.com *.domain.com ;
#charset koi8-r;
#access_log logs/host.access.log main;
location / { root bla; index index.php index.html index.htm; } location /TC/ { alias /home/tradecontrol/client/; }
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html # error_page 500 502 503 504 /50x.html; location = /50x.html { root bla; }
# proxy the PHP scripts to Apache listening on 127.0.0.1:80 # #location ~ .php$ { # proxy_pass http://127.0.0.1; #}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ .php$ { root bla; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /usr/local/nginx/bla$fastcgi_script_name; include fastcgi_params; }
# deny access to .htaccess files, if Apache's document root # concurs with nginx's one # #location ~ /.ht { # deny all; #} }
I have a large proxy, are getting ~3k pageviews/day.
I only got 128 MB RAM on my VPS, so no panels works on it (not even kloxo/lxa). I would guess apache wont do it in the long run either.
So I decided to go with nginx. But I feel it isn't quite good optimized, as it sometimes takes like 1 minute to load the page.
Here is my current config:
####################################################################### # # This is the main Nginx configuration file. # # More information about the configuration options is available on # * the English wiki - http://wiki.codemongers.com/Main # * the Russian documentation - http://sysoev.ru/nginx/ # #######################################################################
#---------------------------------------------------------------------- # Main Module - directives that cover basic functionality # # http://wiki.codemongers.com/NginxMainModule # #----------------------------------------------------------------------
we got installed Nginx on server though it helped us to reduce load of our file uploading sites server ,strange but uploads are not working, script uses uber upload please help me to get it work
I have nginx conf which works perfectly fine with ip adress,but when i put domain then php for some reason no longer works,i getting download php file situation.
Here is main conf file:
####################################################################### # # This is the main Nginx configuration file. # # More information about the configuration options is available on # * the English wiki - http://wiki.codemongers.com/Main # * the Russian documentation - http://sysoev.ru/nginx/ # #######################################################################
#---------------------------------------------------------------------- # Main Module - directives that cover basic functionality # # http://wiki.codemongers.com/NginxMainModule # #----------------------------------------------------------------------
A few days ago I switched from lighttpd to nginx for serving images on my photo hosting service. I've noticed speeds have increased greatly, and average server load has dropped from 0.15, down to 0.01.
Nginx was originally made by this russian guy, and has gotten fairly popular among nerds. I was just wondering if anybody else out there is using it, and if they have any tips for optimization, or feature improvements.
The one thing i miss about lighttpd was the server-status module. Nginx has it's own, but it doesn't seem to be as verbose as the one lighttpd had.
I have install FreeBSD and i use Nginx for run my website on this webserver.
All working good and the server running from 1/2month..
Today when i visits my site i have see Nginx Gateway Error 502.. and from shell i run top command and all processor are using 0% of cpu but use the normal ram..
all is stopped..
but i don't know why and how happen..
Any people have the same error?
I think i do create a monitor script and when appen just reboot the server (i have solve this problem rebooting the server each 502 error)
does anyone on this forum know how to do a referral check to prevent hot linking to files that are on a nginx server? There is this regex code you use but I don't know how to put it together. how to do it on nginx using their rewrite module?
nginx will look for web files under /usr/local/nginx/html. However, I want to put my website files under /home/public_html, is that possible with nginx? I can not find many things about nginx conf file explanation,
I am wondering if there is an easy way to convert apache to nginx on my Plesk 12 server. Ideally, I would like to save all my hosts without having to re set them all up. I have been searching online, but haven't found a simple way to do so.
According to the latest trend and technological advances, which server software should people go with from the very beginning. Which do you recommend as on today?
btw anybody has experience with all 3 (apache/nginx/litespeed) webservers?
I have -
On a common shared environment, I started off with Apache - was fine until some load started generating and it became crapache.
Then litespeed - Totally awesome, could seriously feel the difference, but its cost is something not everybody can afford.
Then nginx - Very nice, felt like litespeed only, the only difference was it got quite complex in configuring it at a later stage BUT its free'ness made me love it badly.
Has anybody successfully used nginx in a shared web hosting environment?
It seems quite powerful and looks like it would be well suited for such an environment, combined with FastCGI, looks like it could serve a lot of hits on relatively inexpensive servers.
The main problem I'm foreseeing is a demand for mod_rewrite, which may cause some support headaches.
Anything else I'm not thinking of?
(I did search but the last post I found was from 2007 with no replies, and necroposting is bad)
I have a VPS running Parallels Plesk 12.0.18 Update#36 and CentOS 6.6. I'll like to move (if it's possible uninstall complete) Apache and let Nginx to manage all the request coming from outside.
Today at 12.50 pm my (ubuntu 14.04.1 LTS) server running plesk 12.0.18 suddenly stopped serving websites. Any attempts to access a webpage on any vhost returned the 502 bad gateway using Nginx error messsage.When I looked at the nginx logs, I found messages like:
Connection refused) while connecting to upstream, client: m.m.m.m, server: , request: "GET /server-status HTTP/1.0", upstream: URL....
Restarting apache & nginx (/etc/init.d/apache2 restart & /etc/init.d/nginx restart) made no difference and I had to reboot to restore http access.
Strangely if I browsed with port 7080 specified (i.e. http://n.n.n.n:7080), this worked fine for all vhosts, so apache (which I believe is listening on this port while nginx listens on port 80) is working fine - nginx is just not able to pass stuff to it?
My current version of nginx in plesk 11.5.44 is 1.5.0 and i would like to update it to the latest stable version which is 1.6.0. However, i cannot seem to manage to do so. I tried with yum update nginx but i receive Package(s) nginx available, but not installed.
this is a fresh Plesk 12 installation on a Dedicated Server, on Debian 6. I haven't installed a License key yet.When i tried to run MIgration Manager, the loading was taking forever. Also, when i try to enter Webserver Configurations Troubleshooter, i get 502 Bad Gateway nginx error.In the /var/log/sw-cp-server/error_log i get this error:
Code: 2015/06/17 11:42:47 [error] 3918#0: *52 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: A.B.C.D, server: , request: "GET /modules/configurations-troubleshooter/index.php/index/list HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "X.X.X.X:8443", referrer: "https://X.X.X.X:8443/admin/module/list?context=modules" When i try to insert a Plesk License, i also get this error:
My server admin already upgraded my OpenSSL to version 1.0.1m 19 Mar 2015 and he also upgraded Nginx to 1.6. I'm also running CentOS v5.11 and Plesk v11.5.
However, he tells me that he still can't get TLS 1.2 to work because he noticed that my server uses a different version of Nginx (sw-nginx), which he believes is part of Plesk. How we can get TLS 1.2 working on the Plesk copy of Nginx (sw-nginx)?