
: 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
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
More posts by @Hamaas447
Terms of Use Create Support ticket Your support tickets Stock Market News! © vmapp.org2025 All Rights reserved.