Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


I want run a wordpress site. Which OS should i use? - Page 2
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

I want run a wordpress site. Which OS should i use?

2»

Comments

  • Exactly my thoughts lol.

    I would recommend Ubuntu for it's ease of use and it's cutting edge package updates.
    However I am currently using CentOS on 2 of my boxes. Only because the main dedi is running cPanel and its accompanying VPS is running cPanel DNS Only and both require CentOS.

  • no debian 7 with openvz (since most providers are still using old ovz deb 7 template which crashes when dist-upgrade)
    anything else should be fine, which is easiest for you

  • @kyaky said:
    no debian 7 with openvz (since most providers are still using old ovz deb 7 template which crashes when dist-upgrade)
    anything else should be fine, which is easiest for you

    RamNode doesn't use that one, but that has happened to me in the past and it was a nightmare to "fix."

  • sleddogsleddog Member
    edited February 2014

    If I was gonna start a Wordpress site tomorrow I would:

    • Grab a FAPVPS current offer and bump it to 512MB RAM for an extra $3. I have one. Excellent service & support. They are indeed FAP :)
    • Install Debian 7, with dotdeb repo (as I said before).
    • Decide whether I wanted PHP 5.4 with APC opcode cache, or PHP 5.5 with its built-in opcode caching.
    • Install Wordpress and the Nginx Helper plugin for cache purging.
    • Configure nginx fastcgi_cache in the nginx setup.
    • Enjoy.

    I've become a huge fan of the nginx fastcgi_cache. The cache purging module for Wordpress is excellent. The dotdeb repo provides nginx pre-built with the necessary third-party module for purging. The native build of nginx on Debian, Ubuntu, CentOS and the official nginx build does not provide this capability. There's no PPA providing it for Ubuntu. PITA.

    Deb 7 + dotdeb provides a ready-to-go solution and a superb nginx, php-fpm, wordpress platform. All on a responsive, 512MB KVM for $18 annual. You can't beat it :)

    Thanked by 1fapvps
  • @sleddog said:
    If I was gonna start a Wordpress site tomorrow I would:

    • Grab a FAPVPS current offer and bump it to 512MB RAM for an extra $3. I have one. Excellent service & support. They are indeed FAP :)
    • Install Debian 7, with dotdeb repo (as I said before).
    • Decide whether I wanted PHP 5.4 with APC opcode cache, or PHP 5.5 with its built-in opcode caching.
    • Install Wordpress and the Nginx Helper plugin for cache purging.
    • Configure nginx fastcgi_cache in the nginx setup.
    • Enjoy.

    I've become a huge fan of the nginx fastcgi_cache. The cache purging module for Wordpress is excellent. The dotdeb repo provides nginx pre-built with the necessary third-party module for purging. The native build of nginx on Debian, Ubuntu, CentOS and the official nginx build does not provide this capability. There's no PPA providing it for Ubuntu. PITA.

    Deb 7 + dotdeb provides a ready-to-go solution and a superb nginx, php-fpm, wordpress platform. All on a responsive, 512MB KVM for $18 annual. You can't beat it :)

    are you an employee of FAPVPS ?

  • SanderSander Member
    edited February 2014

    If you are newbie just order openvz and then use centos or ubuntu. :)

  • @sleddog would you care to share your nginx config for wordpress?

    @Sander I recommend KVM/Xen better for beginner. OVZ has some surprises - better for more experienced people

  • lukenstine said: are you an employee of FAPVPS ?

    No. A client.

  • sleddogsleddog Member
    edited February 2014

    jcaleb said: @sleddog would you care to share your nginx config for wordpress?

    /etc/nginx/nginx.conf

    http {
    
        #fastcgi cache, site #1:
        fastcgi_cache_path /run/shm/example.org levels=1:2 keys_zone=EXAMPLE:10m inactive=1y;
    
        #fastcgi cache, site #2:
        #fastcgi_cache_path /run/shm/somedir levels=1:2 keys_zone=SOMENAME:10m inactive=1y;
    
    
        fastcgi_cache_key "$scheme$request_method$host$request_uri";
        fastcgi_cache_use_stale error timeout invalid_header http_500;
        add_header rt-Fastcgi-Cache $upstream_cache_status;
    
        ... 
    
    }

    /etc/nginx/sites-available/example.org

    server {
        server_name  example.org;
        access_log   /var/log/nginx/example.org_access.log;
        error_log    /var/log/nginx/example.org_error.log;
        root         /home/sleddog/web/example.org;
        index        index.php;
    
        set $skip_cache 0;
    
        # POST requests and urls with a query string should always go to PHP
        #if ($request_method = POST) {
        #   set $skip_cache 1;
        #}
        if ($query_string != "") {
            set $skip_cache 1;
        }
    
        # Don't cache uris containing the following segments
        if ($request_uri ~* "(/wp-admin/|/xmlrpc.php|/wp-(app|cron|login|register|mail).php|wp-.*.php|/feed/|index.php|wp-comments-popup.php|wp-links-opml.php|wp-locations.php|sitemap(_index)?.xml|[a-z0-9_-]+-sitemap([0-9]+)?.xml)") {
            set $skip_cache 1;
        }
    
        # Don't use the cache for logged in users or recent commenters
        if ($http_cookie ~* "comment_author|wordpress_[a-f0-9]+|wp-postpass|wordpress_no_cache|wordpress_logged_in") {
            set $skip_cache 1;
        }
    
        location / {
            try_files $uri $uri/ /index.php?$args;
        }
    
        # Deny access to any files with a .php extension in the uploads directory
        location ~* /(?:uploads|files)/.*\.php$ {
            deny all;
        }
    
        # htpasswd protect wp-login.php and php files in wp-admin/
        location ~ (wp-login\.php|wp-admin/.*\.php) {
            auth_basic "Identify Yourself";
            auth_basic_user_file /home/sleddog/.htpasswd;
            try_files $uri /index.php;
            include fastcgi_params;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
        }
    
        location ~ \.php$ {
            try_files $uri /index.php;
            include fastcgi_params;
            fastcgi_cache_bypass $skip_cache;
            fastcgi_no_cache $skip_cache;
            fastcgi_cache EXAMPLE;
            fastcgi_cache_valid 1y;
            fastcgi_pass unix:/var/run/php5-fpm.sock;
        }
    
        location ~ /purge(/.*) {
            # allow server IP.
            allow 192.168.0.1;
            deny all;
            fastcgi_cache_purge EXAMPLE "$scheme$request_method$host$1";
        }
    
        # Expires and logging configurations
        
        location ~* ^.+\.(ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
            expires max;
        }
        location ~* \.(css|js) {
            expires 2h;
        }
        location ~* ^.+\.(ico)$ {
            expires max;
            access_log off;
            log_not_found off;
        }
        location = /robots.txt {
            log_not_found off;
        }
        location ~ /\. {
            deny  all;
        }
        
    }
    Thanked by 2jcaleb CharlesA
  • The better question to ask is which one are you more familiar with, what linux distro are you "learning linux" on?

  • @sleddog sorry if this question is dumb. how would nginx know if a page has been updated already and cache copy is not valid anymore?

  • sleddogsleddog Member
    edited February 2014

    jcaleb said: @sleddog sorry if this question is dumb. how would nginx know if a page has been updated already and cache copy is not valid anymore?

    Via the nginx helper plugin: http://wordpress.org/plugins/nginx-helper/

    Page about it (by the plugin author): https://rtcamp.com/wordpress-nginx/tutorials/single-site/fastcgi-cache-with-purging/

    Warning: ignore the Ubuntu setup -- the nginx PPA referenced (brianmercer) is out-of-date/abandoned. Just use Deb 7 + Dotdeb :)

  • thanks boss!

  • kyakykyaky Member
    edited February 2014

    @CharlesA said:
    RamNode doesn't use that one, but that has happened to me in the past and it was a nightmare to "fix."

    I know, when you see:

    The system is going down to maintenance mode NOW! shutdown: timeout opening/writing control channel /run/initctl init: timeout opening/writing control channel /run/initctl

    It drives you crazy

  • @sleddog: Thanks for the config. I tried a few different things in testing before I pushed it to production, but I always ran into problems where nginx wouldn't run any php in the admin area if I had an IP restriction on it. I couldn't figure it out.

    @kyaky: Indeed. It takes a minute for it to sink it and then it's full on rage mode

  • For lowend and everything else, I recommend Alpine Linux!

  • @jcaleb said:
    sleddog would you care to share your nginx config for wordpress?

    Sander I recommend KVM/Xen better for beginner. OVZ has some surprises - better for more experienced people

    Yeah i agree with this. openvz does not follow all the rules of LINUX since the host can do some funny things to get more peromance for the rest of the customers.

  • CharlesA said: @sleddog: Thanks for the config. I tried a few different things in testing before I pushed it to production, but I always ran into problems where nginx wouldn't run any php in the admin area if I had an IP restriction on it. I couldn't figure it out.

    Did you get it working?

  • One of the best OS's for webhosting is FreeBSD. Very easy, user friendly and powerful. I ran several sites with FreeBSD as base OS and they were fast as hell. Also for installing software FreeBSD should be your choice. You will love the ports and package system!

  • for beginner you would want to run apache/mysql/php setup, its easier to config with apache than nginx

  • CharlesACharlesA Member
    edited February 2014

    @sleddog said:

    Haven't had a chance to look into it. I'll see if I can dig up my nginx config and see how it matches up with the one you posted. I'm also using varnish in front of nginx, so that might be part of the problem, but I doubt it as the same issue occurred over http and https.

    EDIT: Found it, put it up on owncloud:
    https://dl.charlesauer.net/public.php?service=files&t=6949839e1c0a8a42dfd43a4ddeab9765

  • Oracle Solaris SPARC is fast and reliable, try it.

  • @kaflo said:
    I see a lot of threads like this where most people will reply with their recommendations to the OP's question and yet offer no justification whatsoever.

    When you say for example Debian or CentOS or Ubuntu, tell us why you think so!

    On that note... my answer to the question is

    Debian :D

    Just a teeny tiny bit hypocritical? cough
    You tell others to explain why they have recommended the OS yet you do not do so yourself?

  • lukenstine said: I'm still learning linux this is my first year

    As you've gathered by now, asking which OS is the best is sort of like asking which religion is the best. It can lead to all sorts of nastiness.

    My suggestion is to flip a coin. You can't go wrong with either centos or ubuntu. More important than the choice of OS is sticking with it when the going gets tough. Good luck.

  • @Brad said:
    Where is your justification?

    Look up the meaning of irony

    I know, right?

    @itrmike said:
    You tell others to explain why they have recommended the OS yet you do not do so yourself?

    What I told Brad

    But seriously to the OP, use whatever OS you're comfortable with. That's what really counts in the end.

Sign In or Register to comment.