How to provide Hosting with NGINX?

HostingFever

New member
Hello Friends,

Many of my customers ask for NGINX hosting. Right now we have many cPanel and Plesk Servers. Can anybody suggest me the best, hassle free and secure way to resell NGINX hosting to my customers. ?

Thanks
Prateek

<MOD NOTE: Signatures must be setup in your profile and not manually added to your messages.>
 
I have no idea about NGINX configuration. I have heard that in place of .htaccess customers will have to add a different configuration file for NGINX. Most of the sites i'm planning will be WordPress based, so any risk as they will be my customers and i don't want their sites to stop working. I need honest replies as the decision is critical.
 
You may find with the big hosting companies (hostgator ect) they might reply quickly but it will be some untrained Indian guy copying and pasting responses. Go for a medium sizes company and I guarantee they will provide more personal help and be more willing to assist you in your needs.
 
this is what it stated from in WHMXtra if you look to install it

NGINX - Author: NGINXCP
A lightweight alternative to using apache. Please read the note below prior to installing. Click Here to visit this products home page. After install refresh your WHM window and access from WHM Plugins menu. Intaller will run in a new window. This installer will also modify CSF if installed to make sure nginx is not seen as a suspicious process by mistake.
Do not install if you require use of htaccess files. Also if you use Joomla or WordPress or make use of mod rewrite some additional configuration may be required, do not install if you are unable or unwilling to do the extra work. If you are just serving straight up html and php etc this will work fine for your needs.
 
Do you have any experience running Nginx? Unless you actually know what you're doing OR have someone that knows what they're doing, I wouldn't recommend it.

Why are your clients asking specifically for Nginx? Sounds like an unusual request from your average folk.
 
Last edited:
I had a client ask me about Nginx ( he was a long term client who is a web designer) so it was not an unusual request from him. I told him that if he wanted Nginx then he would have to get a VPS of his own. I then gave him the info as i posted earlier. This then changed his perception of it.
 
I had a client ask me about Nginx ( he was a long term client who is a web designer) so it was not an unusual request from him. I told him that if he wanted Nginx then he would have to get a VPS of his own. I then gave him the info as i posted earlier. This then changed his perception of it.

I've installed and setup a nginx webserver before without any issues. I actually kind of like it. Very resource friendly.

With that being said ... after reviewing the info you posted earlier as well ... I do not blame anyone for steering clear of it when needing a control panel integrated with it. I just use it for a simple sandbox with PHP setup on it.

Was really shocked to read about how "hacky" it is with cPanel / WHM.

Good to know and thanks for posting that.
 
NGINX will only give you an advantage if you are serving mostly static data.

UnixGuru sold shared hosting based on NGINX > Varnish > Apache from March 2010 to May 2015 and if set up correctly NGINX is configured to server everything except PHP, which is passed to Varnish, if not cached is then passed to Apache, which should honour .htaccess.

UnixGuru stills sells this on managed VPSs and custom dedicated servers for customers who have outgrown shared hosting.

We now use LiteSpeed for the Shared/Reseller platform, as it simplifies things and is actually faster than the NGINX/Varnish/Apache setup for the random workload that shared hosting has. (LSCache replaced Varnish).

In the 5 years we sold NGINX, the main benefit we saw, was less Apache processes needed and therefore approximately a 75% saving on memory allocated to the webserver stack.
You can use that extra memory to cram 4 times as many customers onto the server, or to cache more files, reducing disk I/O (the enemy of shared hosting). We used it for the latter.

The main speed gain here, came from Varnish (which you haven't mentioned), which allowed servers to withstand a deluge of visits, including one site which got 750,000 visitors one day as it was mentioned on Slashdot & Reddit.
Varnish would serve around 40% of the "Apache" content during the busiest times.

We had developed our own NGINX/Varnish system for DirectAdmin.

However, for some customers who wanted CPanel on their VPS servers we had installed UNIXY's NGINX, Varnish plugin, which was well maintained and easy to use, and appeared totally transparent to the customer, everything worked, just faster.

So we would heartily recommend the UNIXY plugin.

Please note we have NO stake in UNIXY the name of the companies are just because we both use Unix.
 
Hello,

Did you need a control panel that support NGINX on your server or your want just a "plain" NGINX installation?

If you need a control panel that support NGINX, DirectAdmin support NGINX out from the box. Easy to make a basic configuration of your server using their custombuild 2.x feature.
 
Hi,

Here 's the basic NGINX configuration which you can offer -

1. Create a new file in /etc/nginx/sites-available/ called ghost.conf
2. Open the file with a text editor (e.g. sudo nano /etc/nginx/sites-available/ghost.conf) and paste the following:
server {
listen 80;
server_name example.com;

location / {
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://127.0.0.1:2368;
}
}

Change
server_name
to your domain

Symlink your configuration in
sites-enabled
:

$ sudo ln -s /etc/nginx/sites-available/ghost.conf /etc/nginx/sites-enabled/ghost.conf

Restart nginx

$ sudo service nginx restart
 
cPanel is working on providing official support for Nginx. It'll (hopefully) start with cPanel 11.54 and expand on Nginx support from there.

It is mentioned here: https://features.cpanel.net/topic/a...ster-speed-and-lower-load-on-smallers-servers

Looks like the delays were due to EasyApache 3. EA 4 made looking at Nginx a possibility.

Awesome. Thanks Alex. That link truly helps. It is nice to see cPanel working on new technologies. Apache is great, it is a known standard ... but people want choices....
 
Last edited:
cPanel will release support for nginix within next few month(check their feature request status for nginix)

Once they will release a support for nginix then it will comes with pre-configured like apache or you will be able to configure it from easyapache option.

Update: Sorry they will work on nginix after releasing a EasyApache 4.
 
Last edited:
For hassle free, probably you can offer your client vps with nginx support. Unless you have done full testing for shared environment, it's not recommended to have it for shared service.
 
Hi,

nginx plugin for cPanel is available, but again the SSL is something that is not dealt with it. I have had a discussion with one of the providers of Nginx plugin and they too agreed with me saying the https on Nginx with this plugin is not yet supported and that Apache is being used for requests on port 443 coming in.

Plesk on the other hand has an inbuilt feature for this and works perfect.

However, I would advise you isolate things. Offer Nginx to the customers seeking Nginx and keep cPanel untouched on its default architecture.
 
Easiest way is to use nginx as proxy "nginxcp" or unixy nginx + varnish. I heard that cpanel are also planning to implement nginx into EasyApache in the near future.
 
Best to run a mix, NGINX for file serving and NGINX gives all PHP or server side code to Apache for processing and Apache sends it to NGINX to send to the user. Gives the benifit of NGINX speed and large requests for most pages and files, and Apache and .htaccess for PHP. Best of both worlds.
 
Top