I am very new to this and I ran into a problem. I am creating a website on VirtualBox and I am trying to port forward ports 80 and 443 but my router is using port 80. I searched everywhere in my router settings but there was no options to change the 80 port to a different one. Is there a way or a command to change the dietpi port from 80 to a different one?
Don’t buy Xiomi routers : (
Welcome to our community.
Did you tried following to enable port forwarding ?
Yes, I have. All ports work except 80.
I think its because the router uses port 80 for this setting page.
But not for the external access? Or is the router reachable on port 80 from internet? I hope not.
I think its is
Is there a way to change the port in dietpi?
Of course you can change port on each application. The way how to do this depends on the app used. Means you would need to tell us what exactly you like to change. Which app you need to adjust.
I am creating a website using WordPress.
The dietpi runs on VirtualBox, I downloaded Nginx.
I want to change the port 80 to any different port so I can port forward it.
You can always forward another port, like 8080 on the router, to 80 on dietpi. This way you don’t need to change anything on the nginx.
if there is really a need to change, you could do following
G_CONFIG_INJECT 'listen 80' ' listen 8080 default_server;' /etc/nginx/sites-available/default
G_CONFIG_INJECT 'listen \[::\]:80' ' listen [::]:8080 default_server;' /etc/nginx/sites-available/default
systemctl restart nginx.service
Thank you for your time and answers.