Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 7513

Networking and servers • how to set up 3 level deep masks for webserver with public IP

$
0
0
Hello guys...

I am facing a problem which I can not figure out, spend coupel days, but at the end erased everything and need to start over...

so, I am in big IPS network, where all users have IP addres as mask of 10.19.1.x... my internal IP is actually 10.19.1.109.
However, my Internet provider delegates me my own external IP address, lets say 93.91.x.x (prefer not to share).
amd of course, I have my own router which receives the 10.19.1.109 and behind that I have stuff like TV, laptop, phones, and also Rasberry Pi 5...

and what I want to do is to set up a webserver running on the rasberry.
so what I need to do (my understanding):

1) install apache, php, mariadb, phpmyadmin
2) on the router set port forwarding for 80 and 443 to the rasberry (this point is done)
3) set A record at my domain registrator to my public IP (this point is done)
4) set up apache to use fodlers for each subdomain (including www. or even without subdomain)
5) install any ssl certificate (free one, so I assume Lets Encrypt) for each subdomain (or best to use for all like *.domain.com)
6) set up ssl certificates for apache to use

so far in last days what I achieved is to:
- install apache, php, db, phpmyadmin (1)
- set the ports on router to forward to rasberry (2)
- i did set the proper A record and all was working (3)
- i DIDNT know where to set each domain to use which fodler for each subdomain (i prefer to use some logic not to set each subdomain separately... but to which subdomain i open (ie :something.domain.com) then the folder for web will be used "something")
- also certificate i managed only for domain.com... for whatever reason *.domain.com i was not able, so even when i opened https://subdomain.domain.com the content was shown but next to url browser said "Not Secure".... certificate issuer was not self-signed but proper Lets Encrypt, but the domain was not *.domain.com but only domain.com (so only https://domain.com didnt show me this "Not Secure")

If I can ask for step by step how to isntall and set up everything, please...
After days lost, I cleared everything and lets start over each step.

PS: possibly I want to somehow also access the router webcontent, so I am afraid if I set this port forwarding from router to rasberry, then even when I open IP of the router in order to get into router interface, then it will redirect me to rasberry
- unfortunatelly when I am out of home and connected via OpenVPN to the router, still I cant access 192.168.0.1 (router interface) because security blocks tunnel to access router (so only real local (W)LAN users can access) - this has no setting as far as I know... and same if I allow remote management, then it just refuses connection when i try to open it via browser... either external IP or internal (10.19.1.109)... also tried to set up custom port "1234" in order to be sure it does not try to resend me to rasberry, but no difference (connection refused for either IP) and during creation of ssl certificate it gived me error that 1234 is not correct https port (so perhaps i can set this on router AFTER certificate is issued and installed?):
Image
- my router is TP-Link AX1800

Thank you guys,
I am very desperate

Statistics: Posted by shokarta — Fri Dec 12, 2025 7:36 am — Replies 0 — Views 8



Viewing all articles
Browse latest Browse all 7513

Trending Articles