PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, September 21, 2022

[FIXED] Why nginx virtual host is not available from internet?

 September 21, 2022     nginx, virtualhost     No comments   

Issue

I made a virtual host with nginx and I've add to host:

127.0.0.1        testapp

the virtual host http://testapp is available on my VPS but via from internet is not accessible:

server {
        listen       80;
        server_name  testapp testapp.51.x.x.172;
        ##root   html;
        root c:/apps/web;
        index  index.html index.htm;
        }

Solution

You have DNS problem. You had to define a CNAME record on your host like testapp FQDN will be testapp.yourdomain.com and target host should be your yourdomain.com which is already registered A record.

In your host you should add this line.

127.0.0.1    testapp.yourdomain.com

your problem was finished But you probably need to done a proxy revers on your web server.



Answered By - Parsaria
Answer Checked By - Pedro (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing