First, I’ve solely a really primary understanding of networking. I am certain there are some apparent errors right here, however please perceive that I’m very a lot a beginner!
I’ve a Good/RG SR400ac modem/router that was offered by my ISP. I’ve a Netgear Nighthawk R6900P that’s linked to the Good/RG, and my webserver is linked to the Netgear R6900P. Having the R6900P was an try so as to add an additional layer of safety (undecided if it is the fitting option to do it).
The server is working Apache 2.4. Within the conf/additional/httpd-vhosts.conf I’ve 3 websites configured: “www”, “shared”, and “site2”. “shared” has some javascript and css that’s shared between “www” and “site2”. I’ve points when making an attempt to entry the completely different websites from my cellphone.
httpd-vhosts.conf:
Hear 80
Hear 8080
Hear 8081
Hear 8082
Hear 8083
Hear 8084
Header all the time set Referrer-Coverage "same-origin"
SetEnv HTTP_PHP_GLOBAL "C:apache_phpphp_global"
#PUBLIC
DocumentRoot "c:apache_phpsitespublic"
ServerName www.mysites.com
ServerAlias mysites.com
ErrorLog "logs/www.mysites.com-error.log"
CustomLog "logs/www.mysites.com-access.log" widespread
Choices Indexes FollowSymLinks
Order permit,deny
Enable from all
Require all granted
Header all the time set Entry-Management-Enable-Origin "http://*.mysites.com"
DirectoryIndex index.php
#GLOBAL
DocumentRoot "c:apache_phpsitesshared"
ServerName shared.mysites.com
ServerAlias shared.mysites.com
ErrorLog "logs/shared.mysites.com-error.log"
CustomLog "logs/shared.mysites.com-access.log" widespread
Choices Indexes FollowSymLinks
Order permit,deny
Enable from all
Require all granted
Header all the time set Entry-Management-Enable-Origin "http://*.mysites.com"
DirectoryIndex index.php
#SITE2
DocumentRoot "c:apache_phpsitessite2"
ServerName site2.mysites.com
ServerAlias site2.mysites.com
ErrorLog "logs/site2.mysites.com-error.log"
CustomLog "logs/site2.mysites.com-access.log" widespread
Choices Indexes FollowSymLinks
AllowOverride All
Require all granted
Header all the time set Entry-Management-Enable-Origin "http://*.mysites.com"
DirectoryIndex index.php index.html
Within the Good/RG I’ve these configurations to ahead http visitors to the R6900P:
port forwarding > wan to wan > 192.168.1.110 (vacation spot IP) > tcpudp (protocol) > 80-80 (native port) > 8080-8088 (public port)
port forwarding > wan to wan > 192.168.1.110 (vacation spot IP) > tcpudp (protocol) > 8080-8088 (public port) > 80-80 (native port)
Within the R6900P, I’ve this within the port forwarding (the webserver has a reserved ip of 10.0.0.2):
exterior begin port inner begin port inner ip
HTTP 80 80 10.0.0.2
local_web 8080 8088 10.0.0.2
With this configuration I’m able to entry all the websites utilizing the area identify “www.mysites.com:8084”, “site2.mysites.com:8082”, and so on. from the native desktop computer systems so long as I’ve the /and so on/hosts file configured:
10.0.0.2 site2.mysites.com
10.0.0.2 shared.mysites.com
10.0.0.2 www.mysites.com
10.0.0.2 mysites.com
192.168.1.110 site2.mysites.com
192.168.1.110 shared.mysites.com
192.168.1.110 www.mysites.com
192.168.1.110 mysites.com
Nonetheless, since I am unable to edit the hosts file on my cellphone, I can solely entry a few of the websites from my cellphone. Additionally, I’ve the next situations with my cellphone:
- linked to Good/RG wifi (192.168.1.x)
- linked to R6900P wifi (10.0.0.x)
- linked to 4G community by my cellphone service
There are additionally the situations of accessing the websites by ip deal with or by area identify, relying on which wifi or 4G I’m linked to. I arrange the completely different ports for every web site (8081, 8084, 8082) in an try and get it to work whereas on wifi by getting across the area identify, however it does not work in each situation.
For instance, if I am on my cellphone on 4G, I can entry site2.mysites.com:8084 and www.mysites.com:8082. If I change the cellphone to the Good/RG or R6900P wifi, I’m unable to entry these (It simply says “unable to attach”).
If I hook up with the R6900P wifi, I can entry 10.0.0.2:8084 and 10.0.0.2:8082.
If I am on the Good/RG wifi, I am unable to entry 192.168.1.110:8084 (the connection instances out). I can entry 192.168.1.110 (no port, which takes me to the “www” model), however it takes perpetually to load.
The one which’s actually perplexing is I’ve a web page on site2.mysites.com:8084/page1.php that has some recordsdata which can be positioned on shared.mysites.com:8081. I’ve a username and password arrange in apache that requires authentication for each websites. I can entry page1.php, however the shared recordsdata do not load. When page1.php hundreds, I get prompted to enter the username & password for site2, which it likes. Then I get a immediate to enter the username & password for shared – I get no errors however the recordsdata do not load. Because it’s on cellular I am unable to see if any errors are occurring.
I have been studying about these things, however I get overwhelmed as a result of there are such a lot of transferring components and I do not know the place to begin. It might be:
- configuration of my area registrar
- Good/RG config
- R6900P config
- apache config
- and so on/hosts (which I am unable to edit on my cellphone)
It appears that evidently the area identify is simply not acknowledged whereas on both wifi community for some purpose. It is going to attempt to log me in to the router’s configuration web page in sure situations (if I am on the Good/RG wifi and go to mysites.com), or simply say it could possibly’t join.
Within the analysis I’ve performed, evidently perhaps establishing a neighborhood DNS may repair all these points? Since all of the websites work completely from the desktop computer systems the place I can configure the and so on/hosts file, it form of is sensible? However I did not need to get too far into that if it isn’t going to work.
And concepts for a way I may repair this mess are welcome. Thanks.