Moving from standard Apache httpd install to virtual hosts

  1. First you need to create an appropiate directory for virtual host. (Using the example of creating an intranet)

$ su –
$ useradd intranet
$ chmod 755 /home/intranet # needed for apache nobody process
$ cd /home/intranet
$ mkdir www logs
$ cd www
$ echo “

intranet test index ” > index.htm
  1. Second, you need to reconfig Apache Httpd for virtual host management.

$ cd /opt/httpd/conf
echo “Include conf/httpd.include” » httpd.conf
$ vi httpd.include

NameVirtualHost 111.111.111.111
<VirtualHost 111.111.111.111>
    ServerAdmin webmaster@site.com.au
    DocumentRoot /home/intranet/www
    ServerName intranet.site.com.au
    ServerAlias intranet
    LogLevel info
    ErrorLog /home/intranet/logs/error.log
    CustomLog /home/intranet/logs/access.log combined
</VirtualHost>
  1. Reboot Apache Httpd

$ apachectl graceful

Tagged with: Linux

Related Posts

Why Being Proactive Is Always a Winning Approach

Many companies manage production infrastructure using a reactive model rather than a proactive one. Organizations typically react to warnings and alerts, then implement corrective actions in response. While some companies have well-designed architectural patterns—such as feature flags and rate limiting—that can quickly mitigate the impact of issues, these are merely temporary solutions, not resolutions.

Read more

AWS CLI support for Aurora DSQL and S3 Tables

If you were following the AWS Re:invent keynote yesterday there were several data specific announcements including Aurora DSQL and S3 Tables . Wanting to check them out, I downloaded the latest AWS CLI 2.

Read more

Migrating off of WordPress - A Simplified Stack

The ongoing drama between Wordpress v WP Engine continues to cross my reading list, but I have permanently removed WordPress from my website. I have finally transitioned away from the complex Linux/Apache/MySQL/PHP (LAMP) stack required for self-hosting WordPress on my professional website.

Read more