PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 21, 2022

[FIXED] How Can I Host Multiple Websites Under One Amazon EC2 Instance?

 September 21, 2022     amazon-ec2, apache, virtualhost     No comments   

Issue

I've followed this guide to do this but I'm having no luck inspite of my incessant Googling. Any advice would be supremely appreciated.

https://nouveauframework.org/blog/vhosts-running-multiple-sites-on-a-single-aws-ec2-instance/

I've setup Hosted Zones for the respective domains I wish to host. I've linked them to my instance via A records pointing to the instance IP, as well as adding the new nameserver records to the domains hosted on Namecheap. Furthermore I've created a vhosts folder on my server and edited the httpd.conf file with the respective VirtualHost details and changes needed.

The default Apache page is loading when I visit my respective website domains but the actual website pages themselves are not loading.

How can I fix this?

I'm getting this error when restarting HTTPD

[warn] _default_ VirtualHost overlap on port 80, the first has precedence

The domain names in questions alphagleam.co.uk and conflictzonenorthwest.co.uk


Solution

You need to fix your httpd.conf file and make sure to include

NameVirtualHost *:80

once done make sure to restart apache and it should be ok



Answered By - Frederic Henri
Answer Checked By - David Marino (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing