• DevOps
    Case Study

    How we built a resilient multi-account, multi-cloud solution for a Health Tech service provider!

    READ CASESTUDY
    icon

    24/7 DevOps as a Service

    Round-the-clock DevOps for uninterrupted efficiency.

    icon

    Infrastructure as a Code

    Crafting infrastructure with ingenious code.

    icon

    CI/CD Pipeline

    Automated CI/CD pipeline for seamless deployments.

    icon

    DevSecOps

    Integrated security in continuous DevOps practices.

    icon

    Hire DevOps Engineers

    Level up your team with DevOps visionaries.

    icon

    Consulting Services

    Navigate success with expert DevOps consulting.

  • TechOps
    Case Study

    How we built a scalable Odoo solution for a Travel Tech service provider!

    READ CASESTUDY

    WEB HOSTING SUPPORT

    icon

    HelpDesk Support

    Highly skilled 24/7 HelpDesk Support

    icon

    Product Support

    Boost your product support with our expertise.

    MANAGED SERVICES

    icon

    Server Management

    Don’t let server issues slow you down. Let us manage them for you.

    icon

    Server Monitoring

    Safeguard your server health with our comprehensive monitoring solutions.

    STAFF AUGMENTATION

    icon

    Hire an Admin

    Transform your business operations with our expert administrative support.

    icon

    Hire a Team

    Augment your workforce with highly skilled professionals from our diverse talent pool.

  • CloudOps
    Case Study

    How we helped a Private Deemed University in India, save US $3500/m on hosting charges!

    READ CASESTUDY
    icon

    AWS Well Architected Review

    Round-the-clock for uninterrupted efficiency

    icon

    Optimize

    Efficient CloudOps mastery for seamless cloud management

    icon

    Manage

    Automated CI/CD pipeline for seamless deployments

    icon

    Migrate

    Upgrade the journey, Migrate & Modernize seamlessly

    icon

    Modernize

    Simplify compliance complexities with our dedicated services

    icon

    FinOps as a Service

    FinOps as a Service

  • SecOps
    Case Study

    How we built a scalable Odoo solution for TravelTech service provider!

    READ CASESTUDY
    icon

    VAPT

    Vulnerability Assessment and Penetration Testing

    icon

    Source Code Review

    Ensuring source code security ans safe practices to reduce risks

    icon

    Security Consultation

    On demand services for improving server security

    icon

    System Hardening

    Reduced vulnerability and proactive protection

    icon

    Managed SoC

    Monitors and maintains system security. Quick response on incidents.

    icon

    Compliance as a Service

    Regulatory compliance, reduced risk

  • Insights
    Case Study

    How we helped a Private Deemed University in India, save US $3,500/m on hosting charges!

    READ CASESTUDY
    icon

    Blog

    Explore our latest articles and insights

    icon

    Case Studies

    Read about our client success stories

    icon

    Flipbook

    Explore our latest Flipbook

    icon

    Events

    Join us at upcoming events and conferences

    icon

    Webinars

    Watch our educational webinar series

  • Our Story
  • Contact Us

Interested to collaborate?

Get in touch with us!

Ready to elevate your business with certified cloud expertise? Contact us today to learn how our team can help you leverage cloud technology to drive growth, streamline operations, and enhance security.

  • AWSAWS
  • Azure CloudAzure Cloud
  • Google CloudGoogle Cloud
  • Akamai CloudAkamai Cloud
  • OVHOVH
  • Digital OceanDigital Ocean
  • HetznerHetzner
  • Kubernetes Consultancy Services
  • K8s & Cloud native Solutions
  • 24/7 Infrastructure Monitoring
  • DevOps as a Service
  • Cloud CI/CD Solutions
  • White Labeled MSP Support
  • Our story
  • Life@SupportSages
  • Insights
  • Careers
  • Events
  • Contact Us

Connect with us!


LinkedInFacebookXInstagramYouTube

aws partneraws advanced partner
SupportSages

Copyright © 2008 – 2026 SupportSages Pvt Ltd. All Rights Reserved.
Privacy PolicyLegal TermsData ProtectionCookie Policy

Building up a WordPress website with AWS – PART 2

Albert Reilly

  • 4 min read
Building up a WordPress website with AWS – PART 2

Generating audio, please wait...

SETTING UP VIRTUAL HOSTS

Virtual Hosts are used when we have more than one domain to run with a single IP address. We can have multiple websites on our server and there is no limit to the number of virtual hosts that can be added.

For setting up virtual hosts on CentOS 7, follow the below steps. It is assumed that you have installed LAMP by following the Part One.

Create a new user and then create a directory for the website with the ownership as the new user.

# mkdir -p /var/www/site1/public_html

# chown -R site1: /var/www/site1

Now, create a test page for later checking.

# vi /var/www/site1/public_html/index.html

<html>
  <head>
    <title>site1.com</title>
  </head>
  <body>
    <h1>Success: You Have Set Up your first Virtual Host</h1>
  </body>
</html>

For turning on the virtual host, enter the below contents to the Apache configuration.

# vi /etc/httpd/conf/httpd.conf

<VirtualHost *:80>

ServerAdmin [email protected]

DocumentRoot /var/www/site1/public_html

ServerName www.site1.com

ServerAlias site1.com

ErrorLog /var/www/site1/error.log

</VirtualHost>

These are the most important lines. The star (*) means any one of the server IP. You can enter your server dedicated IP instead. Document Root is the path where the website files are kept. Server name and Alias are the domain name we would be calling. Error log is to track errors.

Restart Apache and check if any error occurs from

Promotional banner

/var/log/httpd/error_log.

# service httpd restart

If you find any error that the document root or files inside have permission issues, do the following. This will manage the SELinux policies.

# semanage fcontext -a -t httpd_log_t "/var/www/site1(/.*)?"

# restorecon -Rv /var/www/site1

restorecon reset /var/www/site1 context unconfined_u:object_r:httpd_sys_content_t:s0->unconfined_u:object_r:httpd_log_t:s0

restorecon reset /var/www/site1/public_html context unconfined_u:object_r:httpd_sys_content_t:s0->unconfined_u:object_r:httpd_log_t:s0

restorecon reset /var/www/site1/public_html/index.html context unconfined_u:object_r:httpd_sys_content_t:s0->unconfined_u:object_r:httpd_log_t:s0

restorecon reset /var/www/site1/error.log context unconfined_u:object_r:httpd_sys_content_t:s0->unconfined_u:object_r:httpd_log_t:s0

# ls -lZ /var/www/site1/

-rw-r-xr-x. site1 site1 unconfined_u:object_r:httpd_log_t:s0 error.log

drwxr-xr-x. site1 site1 unconfined_u:object_r:httpd_log_t:s0 public_html

And finally reset the file permissions.

# cd /var/www/site1/

# find . -type d -exec chmod 755 {} \;

# find . -type f -exec chmod 644 {} \;

Check the site by calling the domain in browser. If you are testing the site before changing the DNS records, you can do this by adding an host entry on your system.

<IP address> site1.com www.site1.com

In Linux, add the above entry in /etc/hosts after opening it with root privilege.

In Windows, open c:\Windows\System32\Drivers\etc\hosts in a notepad with administrator privilege. You can follow these steps to add multiple virtual hosts. That’s it, you will see the test page loaded in the browser.

We will be discussing other aspects of building a WordPress website with AWS in the next article.

Get 24/7 expert server management

  • Apache
  • VPS
Promotional banner
Promotional banner

Building up a WordPress website with AWS – PART 1

Building up a WordPress website with  AWS – PART 1
  • Apache
  • VPS
logo

Building up a WordPress website with AWS – PART 3

Building up a WordPress website with AWS – PART 3
  • Apache
  • VPS
logo

Building up a WordPress website with AWS – PART 4

Building up a WordPress website with AWS – PART 4
  • WordPress
logo

Building up a WordPress website with AWS – PART 5

Building up a WordPress website with AWS – PART 5
  • Linux
  • WordPress
logo
Building up a WordPress website with AWS – PART 2

Posts by Albert Reilly

Albert likes to explore and learn new things. He is hardworking, enthusiastic and is getting expertise in Linux administration, Networking and Security areas. He understands client requirements and is able to act accordingly. He has been working for 2 years with us.