• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Securely Host Multiple Subdomains on LEMP (HP Cloud)

By Abhishek Ghosh July 17, 2015 2:06 am Updated on July 17, 2015

Securely Host Multiple Subdomains on LEMP (HP Cloud)

Advertisement

Here is a Guide on How To Securely Host Multiple Subdomains on LEMP on HP Cloud With Nginx PHP-FPM Settings & Router Ingress-Egress Policies. GNU/Linux, Nginx, MySQL/MariaDB and PHP is known as LEMP. Whenever we publish basic guide for the cloud servers, specially for OpenStack – be it HP Cloud or Rackspace; we normally install web softwares like WordPress on a single server. For better scalable setup we need many strategies, minimum of which is having a separate database server. We can scale in various ways depending on the need.

 

Securely Host Multiple Subdomains on LEMP in the Context of HP Cloud

 

It is practically easy to get rid of an attack and restore the website with OpenStack Raksha and Floating IP with at least one always working person from SSH side. Plus we use some minimum DDoS protection for the IaaS providers.

When the instances have one FQDN or part of the system like database we have lesser problem from the front end. But sometimes we need to host multiple subdomains or multiple domains – that is FQDN on a same server. It is technically difficult to allocate multiple IPs against one host on HP Helion OpenStack.

Advertisement

---

One example can be if we host WordPress wp-admin on a separate location. The setup becomes very complex and from our business experiences, we would suggest to use 100% enterprise grade help from either Rackspace or HP Cloud for such complicated setups. Ready skilled and experienced manpower is very important for these kind of setup.

Securely-Host-Multiple-Subdomains-on-LEMP-(HP-Cloud)

 

Basic Security For Hosting Multiple Subdomains on LEMP in the Context of HP Cloud

 

Usually no hacking attempt take place on one server with many subdomains and domains for a basic reason – the domains and subdomains are actually not fully professionally used. We divide because we need cost reduction in that scenario. We are providing some help for infrastructure managed servers for server running multiple subdomains on LEMP. It is not exactly right idea that, if I divide the load in to subdomains, headache will decrease. Headache increases from the security point of view. More public facing servers, more problems.

For the router’s Ingress-Egress policy, we would suggest to keep only port 80 and if needed port 443 to keep opened. Functions like SNMP, SMTP for WordPress, ping etc. should be kept to off. It is obviously better to install OSSEC HIDS, port knocking etc.

We configure the hosts file in the way we described before to avoid sudo: unable to resolve host error. That is right. But we basically need to edit that /etc/hosts file to add a FQDN too :

Vim
1
2
127.0.0.1 admin.thecustomizewindows.com
10.0.0.37 admin.thecustomizewindows.com

What we will do for the PHP5-FPM user & group part to control the chance of getting control by outsiders on one FQDN only, on /etc/php5/fpm/pool.d/, for each site/FQDN we will add a specific configuration. Example can be a file for admin.thecustomizewindows.com named admin.thecustomizewindows.com.conf :

/etc/php5/fpm/pool.d/admin.thecustomizewindows.com.conf
Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
[admin.thecustomizewindows.com]
user = admin.thecustomizewindows.com
group = admin.thecustomizewindows.com
listen = /var/run/php5-fpm-admin.thecustomizewindows.com.sock
listen.owner = www-data
listen.group = www-data
php_admin_value[disable_functions] = exec,passthru,shell_exec,system
php_admin_flag[allow_url_fopen] = off
pm = dynamic
pm.max_children = 5
pm.start_servers = 2
pm.min_spare_servers = 1
pm.max_spare_servers = 3
chdir = /

that line – listen = /var/run/php5-fpm-admin.thecustomizewindows.com.sock is already explained on on how to fix unix socket error. The linked article and articles linked from it are very important. There you’ll get the idea how we add more users on GNU/Linux.

So, user = admin.thecustomizewindows.com and group = admin.thecustomizewindows.com means, we have worked on this part to create group and users:

Vim
1
2
sudo groupadd admin.thecustomizewindows.com
sudo useradd -g admin.thecustomizewindows.com admin.thecustomizewindows.com

Now if we run :

Vim
1
sudo passwd admin.thecustomizewindows.com

and then set a password, basically then that admin.thecustomizewindows.com account becomes locked. Without the private key, it becomes near impossible to login via that possible backdoor. Activating UNIX WHEEL group is a good idea.

The rest remains the same like we wrote to host multiple websites on Nginx for HP Cloud. Possibly you should read Hardening WordPress specific for this setup if you run WordPress.

Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Securely Host Multiple Subdomains on LEMP (HP Cloud)

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud

    Here is a Step by Step Guide on Setting Up WordPress Multisite on Nginx on Ubuntu 14.04 on HP Cloud with All Commands and the Configuration.

  • Changing Data With cURL for OpenStack Swift (HP Cloud CDN)

    Changing Data With cURL For Object is Quite Easy in OpenStack Swift. Here Are Examples With HP Cloud CDN To Make it Clear. Official Examples Are Bad.

  • XCache Admin Page on Nginx-PHP5-FPM (Ubuntu, HP Cloud)

    Here is How to Setup a XCache Admin Page on Nginx-PHP5-FPM on Ubuntu Instance Running on HP Cloud. It Gives a Clear Graphical Idea of Caching.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • What is Analog-to-Digital Converter (ADC)September 27, 2023
  • Comparison of Tube Amplifiers and SemiconductorsSeptember 26, 2023
  • What is a Digital-to-Analog Converter (DAC)September 25, 2023
  • Tips on S Pen Air ActionsSeptember 24, 2023
  • Market Segmentation in BriefSeptember 20, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy