Results 1 to 7 of 7

nginx - php-fpm - vbseo

This is a discussion on nginx - php-fpm - vbseo within the General Discussion forums, part of the vBSEO SEO Plugin category; I'm opening this post in hope to get some info on this setup from real world usage, not examples, since ...

  1. #1
    Junior Member
    Real Name
    luis
    Join Date
    Jun 2010
    Posts
    19
    Liked
    0 times

    nginx - php-fpm - vbseo

    I'm opening this post in hope to get some info on this setup from real world usage, not examples, since i can not find a lot of info about vbulletin with this setup, not to mention the vbseo addition.

    After lots of digging some headache and a dead site i got my site working again on a different server with php-fpm and nginx

    Firt, after an almost unresponsive server and being puzzled a few hours, php-5.3 does not seem to play nice (too much server load) after downgrading to 5.2 apache and nginx behaved nicely...
    and then i had to move away the sql server because it went crazy/slow

    My runing config is:

    nginx.conf:
    Code:
    user www-data;
    worker_processes  1;
    worker_rlimit_nofile 8192;
    
    
    
    
    error_log  /var/log/nginx/error.log notice;
    pid        /var/run/nginx.pid;
    
    events {
        worker_connections  2048;
        use epoll;
    }
    
    http {
        server_tokens off;
        include       /etc/nginx/mime.types;
        default_type  application/octet-stream;
    
        access_log  /var/log/nginx/access.log;
    #    error_log   /var/log/nginx/error.log notice;
        
        sendfile        on;
        tcp_nopush     on;
        tcp_nodelay        on;
    
    #    keepalive_timeout  0;
        keepalive_timeout  20	15;
        keepalive_requests	200;
    
        include /etc/nginx/conf.d/*.conf;
        include /etc/nginx/sites-enabled/*;
    }
    my nginx (only/default) vhost:

    Code:
    server {
    	listen       112.123.123.234:80;
        server_name  somesite.com;
            rewrite ^(.*) http://www.somesite.com$1 permanent;
        }
        
        
        
    server {
    	listen       123.123.123.234:80 default;
            root   /var/www/nginx/default/htdocs/;
    
            gzip                            on;
            gzip_min_length                 1100;
            gzip_buffers                    8 16k;
            gzip_comp_level                 1;
            gzip_types                      text/plain text/css application/x-javascript text/xml application/xml application/xml+rss text/javascript;
            gzip_disable                    "MSIE [1-6]\.";
    
            output_buffers                  1 32k;
            postpone_output                 1460;
    
    
    ## vbseo
    location ~ \.php$ {
            include /etc/nginx/fastcgi_params;
            fastcgi_index index.php;
            fastcgi_send_timeout 30;
            fastcgi_read_timeout 30;
            fastcgi_buffers 128 4k;
            fastcgi_buffer_size 4k;
            fastcgi_cache_use_stale timeout;
        fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
        fastcgi_param  QUERY_STRING     $query_string;
        fastcgi_param  REQUEST_METHOD   $request_method;
        fastcgi_param  CONTENT_TYPE     $content_type;
        fastcgi_param  CONTENT_LENGTH   $content_length;
        fastcgi_intercept_errors on;
    
    
    
    	if (-f $request_filename) {
                fastcgi_pass unix:/tmp/php5-fpm.sock;
    	}
    	
        }
    
    location / {
    	index  index.php;
    	rewrite ^/((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ /vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 last;
    	if (!-e $request_filename) {
    	    rewrite ^/(.*)$ /vbseo.php last;
    	}
    
    }
    
    if ($request_filename ~ \.php$ ) {
        rewrite ^/(.*)$ /vbseo.php last;
    }
    
    
    ## /vbseo
    
    
    location ~* (css|js|png|jpe?g|gif|ico)$ {
                    expires 2h;
            }
    
    
    ## no permito q vean los htacces
    location ~ /\.ht {
        deny  all;
        }
    
    
    location /nginx_status {
            stub_status on;
          }
    
    
    }
    my server is now a P3 with 1Gb RAM, load is near 2.5 in average, memory, 900 of 1Gb used, 60Mb swapped.

    on a normal day i can go to 300 users online (200 right now)

    page generation time is between 1 and 2 secs :S, im also using APC

    /nginx-status:
    Code:
    Active connections: 57 
    server accepts handled requests
     26308 26308 72280 
    Reading: 3 Writing: 2 Waiting: 52





    ------------------------------------------------






    How do you see it? what wold you change, and why?


    i got interested on the try_files option i saw in other post, however i did not fully understand if this causes a bug with moving posts, which for now seems like i dont have it.

    i also had to disable attachments rewrite and im having lots of 404's!!! (any fix?)

  2. #2
    vBSEO.com Webmaster Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    23,100
    Liked
    622 times
    Blog Entries
    4
    Basically that server will not be able to hold 300 online users. You need to upgrade your server.
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  3. #3
    Junior Member
    Real Name
    luis
    Join Date
    Jun 2010
    Posts
    19
    Liked
    0 times
    Thanks Mert, thats confusing, i tough i could run this on a VPS with 512 ram, and since the CPU is being shared with other VPSs...
    i think im really wrong on what i knew about this hardware needs then, what would you use for this?

    about the nginx setup, anyone has any toughs?

  4. #4
    Junior Member
    Real Name
    luis
    Join Date
    Jun 2010
    Posts
    19
    Liked
    0 times
    mm i made a mistake the server is P4 2.8Ghz with 1Ghz RAM, SATA hdd

  5. #5
    vBSEO Staff Marco Mamdouh's Avatar
    Real Name
    Marco Mamdouh
    Join Date
    May 2010
    Location
    Egypt
    Posts
    3,143
    Liked
    110 times
    Server with P4 will not run a "good" forum, If your daily forum posts increased so sure your visitors will increase and this server can't hold a high visitors number + more new posts, I would say this server will be better for a personal sites not forums.

  6. #6
    Junior Member
    Real Name
    luis
    Join Date
    Jun 2010
    Posts
    19
    Liked
    0 times
    Thanks Marco,
    @all: what hardware would you recomend for my site, based on your experience ?

  7. #7
    vBSEO.com Webmaster Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    23,100
    Liked
    622 times
    Blog Entries
    4
    It all depends on your stats but if you constantly have 300 online users you will need a powerfull server.
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

Similar Threads

  1. vBulletin 4.x VBSEO on Nginx !
    By angelvn in forum Troubleshooting
    Replies: 9
    Last Post: 12-30-2010, 09:47 AM
  2. vBulletin 3.x vbseo + nginx - 404
    By katmai in forum Troubleshooting
    Replies: 1
    Last Post: 05-07-2010, 09:18 AM
  3. vBSEO won't redirect to pretty URLs under nginx
    By Viper007Bond in forum Troubleshooting
    Replies: 1
    Last Post: 06-23-2009, 07:08 AM
  4. nginx + vBSEO rewrite problem
    By BeoR in forum Troubleshooting
    Replies: 31
    Last Post: 01-15-2009, 03:56 PM
  5. nginx+vbseo, the forum can't merge threads?
    By wangyu1314 in forum General Discussion
    Replies: 1
    Last Post: 08-07-2008, 10:00 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •