Howdy, Stranger!

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

Advertise on LowEndTalk.com
why I never saw a shared hosting uses nginx?
New on LowEndTalk? Please read our 'Community Rules' by clicking on it in the right menu!

why I never saw a shared hosting uses nginx?

omelasomelas Member
edited April 2018 in General

It's wired I can't find one while it gets decent share (20% of active sites)?

Comments

  • easy management like .htaccess i think, so nginx as proxy.

  • MikeAMikeA Member, Provider
    edited April 2018

    Most hosts use cPanel and there is no official Nginx support yet, and seems most addon software to do it are kind of buggy. If you want Nginx, probably best to get a cheap VPS and run it. Could find a Plesk host since it supports Nginx, but they are usually expensive.

    ExtraVM - AMD Ryzen VPS starting @ $3.50
    USA (TX, VA, FL), CA, FR, UK, SGP, AU

  • Lack of .htaccess support is probably one of the top reasons nginx isn't commonly used by shared hosting as nginx equivalent rules to htaccess are really very web app specific.

    And if you need Nginx like performance in shared hosting environment with htaccess support, you have LiteSpeed web server which is better server choice in shared hosting

    * Centmin Mod Project (HTTP/2 support + ngx_pagespeed + Nginx Lua + Vhost Stats)
    * Centmin Mod LEMP Stack Quick Install Guide
  • donlidonli Member
    edited April 2018

    Most shared seems to be using Cloud Linux these days > @eva2000 said:

    And if you need Nginx like performance in shared hosting environment with htaccess support, you have LiteSpeed web server which is better server choice in shared hosting

    It does seem that most shared hosting providers are going with CloudLinux and LiteSpeed these days.

  • WHTWHT Member

    If things brake on nginx there is no official support for it. This is the main reason why a serious provider wont go with nginx.

  • pikepike Member

    @dergelbe said:
    Here is one:

    https://timmehosting.de

    20€/month lul.

    Thanked by 1DewlanceVPS
  • Vova1234Vova1234 Member, Provider

    For 9 Shared servers we use the Nginx + Apache bundle.

    Shared uses a not very smart audience and this has to be done. And will not write the rules in nginx.conf to the rewrite url.

    My Hosting: ABCVG.net

  • No official support from cPanel but soon they will add support for it and you will see many provider will start using Nginx.

    Dewlance
  • I have seen some using Nginx, the main reasons are .htaccess and cPanel. To overcome speed & efficiency many host go for litespeed instead of Nginx.

    Hostter - Serving for years now! Bitcoin Accepted -
    Bitcoin VPS | Bitcoin Hosting

  • FHRFHR Member, Provider
    edited April 2018

    Nginx was not designed to support shared hosting environments. Some shared hosts use it, but only as a caching reverse proxy/TLS termination. The main reason is the lack of .htaccess, which allows a client to setup rewrite rules and caching rules on their own.

    LiteSpeed was designed for shared hosting environments and will provide a painless, but still fast experience for everyone.

    SkylonHost - affordable hourly-billed KVM VPS in Prague, CZ!
    Featuring own high performance network AS202297 | RIPE NCC member | Contact us for IPs/ASNs

  • FHR said: The main reason is the lack of .htaccess

    I wonder if that's fixable.

    #lexit spread the word.

  • FHRFHR Member, Provider

    @willie said:

    FHR said: The main reason is the lack of .htaccess

    I wonder if that's fixable.

    That's a deliberate decision, I don't think anyone is going to do anything about it.

    Thanked by 1yomero

    SkylonHost - affordable hourly-billed KVM VPS in Prague, CZ!
    Featuring own high performance network AS202297 | RIPE NCC member | Contact us for IPs/ASNs

  • donlidonli Member

    @FHR said:

    That's a deliberate decision, I don't think anyone is going to do anything about it.

    Yup, although there are websites that will convert an .htaccess file to the Nginx equivalent.

  • ClouviderClouvider Member, Provider

    @DewlanceVPS said:
    No official support from cPanel but soon they will add support for it and you will see many provider will start using Nginx.

    I’d love to know your source. I’m semi confident that widespread adaptation is not hampered by lack of support in cPanel, but by lack of override file in the form of .htaccess that’s used by Wordpress by default and as such for, i’ll Hazard an assumption, majority of the software running on shared.

    Clouvider Limited - Leading Hosting & Connectivity Partner || Dedicated Server Sale from £39/m - Our Latest LET Offer

    Cloud Web Hosting | SSD & SAS HA OnApp VPS | US, UK, NL & DE Dedicated Servers | Network Services | Colocation | Managed Services

  • Nginx as a single server in shared enviroment, it's going to be difficult that you find a host with that configuration, remember that most of the clients on shared hosting expect that any PHP script will work without adapting rules or making changes.
    Nginx as a reverse proxy for Apache, some hosts have that setup, one that comes to mind is WebFaction and most of the host's that use VestaCP.

  • eva2000eva2000 Member
    edited April 2018

    Yeah nginx with lack of .htaccess support could also become a security issue in shared environment where level of nginx know-how might be less and when web app/script authors use .htaccess to prevent public access to directories via a deny all directive. When a user uploads that script to their nginx site, if they are unaware that a particular directory has .htaccess deny all to prevent public directory access, then you accidentally open and expose that directory to public access !

    For my Centmin Mod LEMP stack i try to mitigate this in latest beta with autoprotect.sh tool which automatically scans web directories on nginx vhosts for .htaccess with deny all directives and does an auto nginx rule conversion to nginx deny all directive https://community.centminmod.com/threads/autoprotect-sh-apache-htaccess-check-migration-to-nginx-deny-all.7308/

    so an Apache directory's .htaccess deny all file at /privatedirectory/.htaccess

    Order deny,allow
    Deny from all
    

    gets automatic conversion into an Nginx equivalent

    location ~* ^/privatedirectory { deny all; }

    which is inserted into domain vhost's included autoprotect file

    /usr/local/src/centminmod/tools/autoprotect.sh
    generated nginx include file: /usr/local/nginx/conf/autoprotect/domain.com/autoprotect-domain.com.conf
    
    autoprotect.sh run completed...
    

    autoprotect.sh can make it more problematic to setup some scripts but there's also a bypass mode so you can skip specific directories from being having their automatic nginx converted rules inserted into the include file and then can setup your own specific nginx rule for that directory. Or can turn off autoprotect on a per nginx vhost basis.

    But i think it's better than an nginx noob user being unaware that a particular web app/script they're using is solely using .htaccess to prevent some private directories from being exposed to the public web!

    For example some wordpress backup plugins dump backups into a directory in web root which is just protected via .htaccess deny all ! Meaning if directory is known, on Nginx without proper nginx equivalent rule, then visitors could access it via domain.com/privatebackupdir/ ! Scary to think how many instances of exposed directories exist on Nginx servers because user didn't know a particular set of web accessible directories aren't meant for public consumption but are only protected via .htaccess which Nginx doesn't support.

    * Centmin Mod Project (HTTP/2 support + ngx_pagespeed + Nginx Lua + Vhost Stats)
    * Centmin Mod LEMP Stack Quick Install Guide
Sign In or Register to comment.