Nginx With CPanel
Mar 7, 2009
I was just wondering if anyone has tried using nginx to accelerate Apache under cPanel?
I found a tutorial on how to do it
[url]
and he got amazing results from trying it
[url]
just wanted to see if anyone else has any experience with it
View 8 Replies
ADVERTISEMENT
Feb 18, 2015
Our server : [URL] .....
plesk v11 (64BITS)
PROBLEM DESCRIPTION
We found 502 Bad Gateway error Nginx on multiple domain "currently troissoeursetunfrere.com is a wordpress site e-commerce" and also malittleboutique.com ecommerce wordpress, possibly to fix this problem we have followed this tutorial " [URL] ....
we perform the following operations:
sudo apt-get remove php5 php5-cgi php5-fpm
sudo apt-get install php5 php5-cgi php5-fpm
Following these operations we lost access to cpanel.
View 3 Replies
View Related
Jul 15, 2009
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;
#}
}
View 4 Replies
View Related
Mar 26, 2009
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.
i have uploaded a copy of the configs onto
www f1colo com / config.txt
View 10 Replies
View Related
May 23, 2009
Well, I decided giving it a shot.
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
#
#----------------------------------------------------------------------
user nginx;
worker_processes 12;
error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
#----------------------------------------------------------------------
# Events Module
#
# http://wiki.codemongers.com/NginxEventsModule
#
#----------------------------------------------------------------------
events {
worker_connections 1024;
}
#----------------------------------------------------------------------
# HTTP Core Module
#
# http://wiki.codemongers.com/NginxHttpCoreModule
#
#----------------------------------------------------------------------
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
#
# The default server
#
server {
listen 80;
server_name _;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.php index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# 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 html;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /usr/share/nginx/html$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;
#}
}
}
Any ideas on better optimizing?
View 9 Replies
View Related
Jun 1, 2009
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
View 2 Replies
View Related
Jun 17, 2009
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
#
#----------------------------------------------------------------------
user nginx;
worker_processes 5;
error_log /var/log/nginx/nginx-error.log crit;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;
pid /var/run/nginx.pid;
#----------------------------------------------------------------------
# Events Module
#
# http://wiki.codemongers.com/NginxEventsModule
#
#----------------------------------------------------------------------
events {
worker_connections 2048;
}
#----------------------------------------------------------------------
# HTTP Core Module
#
# http://wiki.codemongers.com/NginxHttpCoreModule
#
#----------------------------------------------------------------------
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] $request '
'"$status" $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log off;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
# Load config files from the /etc/nginx/conf.d directory
include /etc/nginx/conf.d/*.conf;
#
# The default server
#
server {
listen 81;
server_name main.main.net;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
}
error_page 404 /404.html;
location = /404.html {
root /usr/share/nginx/html;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
# 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 html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$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;
#}
}
}
View 1 Replies
View Related
Apr 3, 2007
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.
nginx homepage: [url]
View 4 Replies
View Related
May 30, 2009
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)
View 4 Replies
View Related
Oct 3, 2009
look for someone to do the installation and configuration of these two (lighttpd or nginx) to run along with Cpanel as compatible as possible.
Hired a 'SultanHost' but the service was not expected and support the worse.
View 12 Replies
View Related
Jun 23, 2009
Here is the comparison between Apache and Nginx. Request processing overhead and real-world application performance measurements included.
[url]
View 7 Replies
View Related
Aug 14, 2008
I am doing my web like this:
1) nginx listening at port 80
2) apache listening at port 78
3) nginx throws all shtml pages to apache
they are working perfectly, except one small thing:
I don't want any public visitor may visit port 78 directly, for now, both:
[url]
[url]
are working for visitors.
Anybody knows how to block/hide port 78 to the public access?
my nginx config snippet:
Code:
location = /index.shtml {
proxy_pass [url]
}
my apache2 config snippet:
Code:
Listen 78
If I make apache as follows:
Code:
Listen 127.0.0.1:78
I will get 502 bad gateway when I visit:
[url]
View 1 Replies
View Related
Jul 24, 2008
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?
View 12 Replies
View Related
Jul 8, 2007
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,
View 0 Replies
View Related
Apr 13, 2015
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.
View 1 Replies
View Related
Apr 20, 2009
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.
View 4 Replies
View Related
Aug 3, 2008
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)
View 0 Replies
View Related
Aug 15, 2007
Anyony use nginx as web server in shared hosting enviroment? maybe with some custom made control panel's?
How is about its scalability, php performance and so on?
View 0 Replies
View Related
Feb 25, 2015
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.
View 4 Replies
View Related
Oct 30, 2014
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:
2014/10/30 14:48:00 [error] 3099#0: *101 connect() failed (111:
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?
View 15 Replies
View Related
May 12, 2014
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.
View 1 Replies
View Related
May 26, 2014
Is here any way to get nginx running on the web nodes and be able to manage it from the CP like standalone Plesk servers?
View 3 Replies
View Related
Dec 17, 2014
We'd like to use this tool from Google on our Plesk server: [URL]
is it useful getting these tools going on server, and are they worth it?
View 1 Replies
View Related
Dec 18, 2014
I running magento on plesk 12 and trying to configure nginx, but only home page is working and all other pages are not working with error 404.
View 6 Replies
View Related
Jun 17, 2015
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:
Code:
2015/06/17 10:29:17 [error] 5643#0: *81 recv() failed (104: Connection reset by peer) while reading response header from upstream, client: A.B.C.D., server: , request: "POST /server/
key_upload.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/sw-engine.sock:", host: "X.X.X.X:8443", referrer: "https://X.X.X.X:8443/server/key_upload.php"
I followed this KB article 118757 but no luck. Also, the server resources are at the lowest usage and there is >2 TB disk space available.
View 2 Replies
View Related