Indeed, it might be an open_basedir problem (it was, in my case)
Edit /var/cpanel/templates/apache2/vhost.local
Change the lines with open_basedir in
php_admin_value open_basedir "/home/[% vhost.user %]/:[% vhost.homedir %]:/usr/lib/php:/usr/local/lib/php:/tmp"
Backup first then rebuild httpd.conf using /scripts/rebuildhttpdconf then restart nginx/apache.
Joomla & Magento cPAddons
Joomla 2.x added as cPanel Addon (free)
New version available here:
Nginx Admin (Stable version) v3.2 Released
11.32 compatible.
Thanx for link.
I got the following errors:
root@ec2-23-21-161-67 [/usr/local/src/publicnginx]# ./nginxinstaller install
/usr/local/src/publicnginx
Welcome to the Nginx Admin installer......Starting Install
Generating vhosts...
Traceback (most recent call last):
File "/scripts/createvhosts.py", line 2, in ?
import yaml
File "/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg/yaml/__init__.py", line 26
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause
Installing WHM interface...
deploying booster rockets
Traceback (most recent call last):
File "/usr/local/src/publicnginx/nginxinstaller2", line 9, in ?
import createvhosts
File "/usr/local/src/publicnginx/createvhosts.py", line 2, in ?
import yaml
File "/usr/lib/python2.4/site-packages/PyYAML-3.10-py2.4-linux-x86_64.egg/yaml/__init__.py", line 26
SyntaxError: 'yield' not allowed in a 'try' block with a 'finally' clause
root@ec2-23-21-161-67 [/usr/local/src/publicnginx]#
Did the script get installed? How do I know if it actually works?
Thanks
Please follow this: Python Error issue Fix
Does nginx allow multiple SSLs (UCC or wildcard certs) per single IP? I noticed in the Virtualadmin documentation a note that it is not possible so I was wondering if cPanel installs suffer from the same limitation.
Thanks
Maybe unrelated to this thread title, but i think what i'm about to write can help other users and the developer.
After installing this CP plugin, i started to get big latency on a random base. My MPM workers were nice with PHP-PFM until, at some point the application started to get latencies of more than 600 ms... I tried to debug it but apparently there were no clear clues why this happened . If i went Apache, the latency was about 50 ms, the same with nginx. It didn't looked like following any logic, until i made a change to the config file through the plugin UI and restarted nginx a couple of times. Right after that i begun to see the big response latency coming back. Before that i changed things directly through cPanel and restarted xginx from there...
The fix is: changing the non SSL port in cPanel back to 80 -> restart Apache from console -> wait 30 seconds or refresh the website so you see Apache as server in headers -> change back the non SSL port to 8081 in cPanel -> restart Apache from console. If i restart from plugin UI in cPanel, the latency nightmare begins. Hope it helps.
S.
EDIT:
This solution proved of no use. But, i later made an interesting discovery. Querying http://example.com:8081 several times brings back the normal latency for a couple of hours on both http://example.com (nginx) as on http://example.com:8081 (Apache). Still investigating
Last edited by appcuario; 04-21-2012 at 12:52 PM.
After I installed this php sessions no longer worked. I have custom session folders for domains. I made those 777 but even this didn't work.
Like for example. I can login, and after redirection it shows me as logged in, but than when switching pages I'm logged out. I'm sure it's a permission error anyone know where I should look?
Normally I have those directory's 711.
Installed this yesterday afternoon on my friends Cpanel server
Noticed an immediate and noticeable speed increase and a fairly significant load drop to boot.
Thanks very much for the plugin.
So it seems the default behavior is now to pass everything to Apache.
How would I go about bypassing this for a specific file type in a sub-directory?
Example:
mysite.com/proxy-to-apache.html
smyite.com/nginx/serve-directly.html
Heres the default filter used in the vhost file:
Code:location / { location ~.*\.(3gp|gif|jpg|jpeg|png|ico|wmv|avi|asf|asx|mpg|mpeg|mp4|pls|mp3|mid|wav|swf|flv|html|htm|txt|js|css|exe|zip|tar|rar|gz|tgz|bz2|uha|7z|doc|docx|xls|xlsx|pdf|iso)$ { expires 7d; try_files $uri @backend; }
Hello there!
I am currently looking into implementing this plugin in my production server. I have read that the main problems, using nginx with cpanel are:
1. Not compatible with .htaccess rules, so wordpress etc won' t work out of the box.
2. Some problem with addon domains, not sure what the problem is exactly.
3. Not compatible with mod_security, so i can' t use gotroot rules.
4. Apache protected folders don' t work.
Do these problems still exist with this plugin? If i make the transition to nginx i want to be sure that it will be 100% transparent to end users, because i can' t modify every account separately.
Hi
I've yesterday upgrade my nginx from admin stable version 3.0 to 3.5 and since after that im receiving a lot of 500 Internal server message on my forum while posting any thread or viewing it.
Please is there any solution for it ?
This is my config file.
Code:user nobody; # no need for more workers in the proxy mode worker_processes 2; error_log /var/log/nginx/error.log info; worker_rlimit_nofile 20480; events { worker_connections 5120; # increase for busier servers use epoll; # you should use epoll here for Linux kernels 2.6.x } http { server_name_in_redirect off; server_names_hash_max_size 10240; server_names_hash_bucket_size 1024; include mime.types; default_type application/octet-stream; server_tokens off; sendfile on; tcp_nopush on; tcp_nodelay on; keepalive_timeout 5; gzip on; gzip_vary on; gzip_disable "MSIE [1-6]\."; gzip_proxied any; gzip_http_version 1.1; gzip_min_length 1000; gzip_comp_level 6; gzip_buffers 16 8k; # You can remove image/png image/x-icon image/gif image/jpeg if you have slow CPU gzip_types text/plain text/xml text/css application/x-javascript application/xml image/png image/x-icon image/gif image/jpeg application/xml+rss text/javascript application/atom+xml; ignore_invalid_headers on; client_header_timeout 3m; client_body_timeout 3m; send_timeout 3m; reset_timedout_connection on; connection_pool_size 256; client_header_buffer_size 256k; large_client_header_buffers 4 256k; client_max_body_size 200M; client_body_buffer_size 128k; request_pool_size 32k; output_buffers 4 32k; postpone_output 1460; proxy_temp_path /tmp/nginx_proxy/; client_body_in_file_only on; log_format bytes_log "$msec $bytes_sent ."; include "/etc/nginx/vhosts/*"; fastcgi_buffers 8 16k; fastcgi_buffer_size 32k; }
Last edited by Kenpachi; 06-12-2012 at 12:18 AM.
^^ The above errors are gone now as it seemed there was some ubc limits put on my vps which after removing, nginx worked fine.