Question
How Do I view my site via public IP address without pointing the domain?
I’m hosting a wordpress backend using Apache. I’m using Node to actually display the site (nextjs).
Additionally I’m using nginx reverse proxy for both Apache and Node.
so, I followed the guide and set up /etc/ngingx/sites-available/domain.com like this:
server {
listen 80;
listen [::]:80;
root /var/www/domain.com/html;
index index.html index.htm index.nginx-debian.html;
server_name domain.com www.domain.com;
location / {
proxy_pass http://localhost:8090;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
location /next {
proxy_pass http://localhost:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
}
When I ssh in and run curl commands, I get the response from both ports.
Unforutnately I cannot yet point the domain to my IP. So in the meanwhile, how can I view the site in browser using public IP?
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×