Mobile app version of vmapp.org
Login or Join
Hamaas447

: Apache VirtualHost setup for client / server on same AWS instance I am trying to setup a ReactJS front end and Wordpress back end on the same AWS instance without a domain name. The AWS instance

@Hamaas447

Posted in: #Apache #Virtualhost

I am trying to setup a ReactJS front end and Wordpress back end on the same AWS instance without a domain name. The AWS instance is running Amazon Linux.

I am attempting to use an IP address and port numbers to map to the Apache virtual hosts. I added the following VirtualHost directives to the httpd.conf file. Where the IP has been replaced with 1.1.1.1

ServerRoot "/etc/httpd"

Listen 80
Listen 8080

Include conf.modules.d/*.conf

User webapp
Group webapp

ServerAdmin root@localhost
ServerName localhost

<Directory />
AllowOverride none
Require all denied
</Directory>

DocumentRoot "/var/www/html/"

<Directory "/var/www">
AllowOverride All
# Allow open access:
Require all granted
</Directory>

<Directory "/var/www/html">
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>

<VirtualHost 1.1.1.1:80>
ServerName 1.1.1.1
DocumentRoot /var/www/html/client/public_html
</VirtualHost>

<VirtualHost 1.1.1.1:8080>
ServerName 1.1.1.1
DocumentRoot /var/www/html/server/public_html
</VirtualHost>


However when I try and access the site it is still directing all traffic to/var/www/html/regardless of whether I try and access port 80 or 8080

10% popularity Vote Up Vote Down


Login to follow query

More posts by @Hamaas447

0 Comments

Sorted by latest first Latest Oldest Best

Back to top | Use Dark Theme