Need help with Plesk, Apache, and Nginx

Discussion in 'Installation/Configuration' started by domz, Nov 9, 2008.

  1. domz

    domz New Member

    I followed the guide:
    http://www.howtoforge.com/reduce-apache-load-with-nginx-rhel5.2
    Code:
    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;
    tcp_nodelay on;
    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 YOURSERVERNAME; #changed this to my server name
    #charset koi8-r;
    #access_log logs/host.access.log main;
    #Main location
    location / {
    proxy_pass http://127.0.0.1:8080/;
    proxy_redirect 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;
    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;
    root /usr/share/nginx/html;
    index index.html index.htm index.php;
    }
    
    I changed the SERVERNAME to xxxx.com www.xxxx.com
    I got that test page and everything
    But my Documentroot in apache httpd.conf is not /var/www/htdocs
    So I changed it to /var/www/vhosts/xxxx.com/httpdocs
    which is where my docs are.. and I downloaded my PHP.. so I added Addhandler (blah blah).. still nothing, it doesnt want to run Ioncube files and it give me a mess.

    When I get rid of all the changes (from the tutorial) the website works because I think PLESK is redirecting everything, but with nginx, its apache that is controlling the documentroot.

    Any other tips?
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Any errors in your logs?
     

Share This Page