LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Web server with public IP address not reachable via domain name in the web browser (https://www.linuxquestions.org/questions/linux-server-73/web-server-with-public-ip-address-not-reachable-via-domain-name-in-the-web-browser-4175446131/)

floorripper 01-18-2013 01:44 AM

Web server with public IP address not reachable via domain name in the web browser
 
Hello,

Recently I have setup a public web server on the internet. I have tested it in the lab with the simulated public IP addresses. Server is behind the cisco firewall and I have allowed ports 22 and 80. In the lab it worked. I was able to reach my server at the mydomain.com
with the local connection to the FW and than to the server. I have entered an entry to the /etc/hosts for a simulated dns lookup for mydomain.com.


I am having running an Wordpress instance on the apache server. Since I have moved it to the public internet segment. My wordpress instance does no work eighter, I can only see the white screen without my theme. There is also an issue to log in into the wp-admin.

When I make nslookup mydomain.com, I can get the right IP address.
ssh and port 80 also works.
from the server itself I can also do nslookups. I have seted up it with public dns server.


I have conntaced company where I have bought the domainname.com and inserted my IP address into the A records.
How can I make it reachable via mydomain.com and why wordpress stopped to work?
Thanks,

I have to admint that I have not done any apache modification.

Quote:

Originally Posted by floatingworld (Post 12461339)
Can you see the site in the browser by typing in the IP address, in the same way that http://127.0.0.1 and http://localhost are equivalent?

- no I cannot

Firewall is open for port 22 and 80. and performs nat to the inside of the network.

Yes, server is on the internet with public ip.

nslookup www.domainname.com works
Ping IP/domainname.com works
ssh works
telnet at port 80 works

I can see my wordpress webpage by using an IP address. But is broken and I cannot navigate to the wp-admin. But that is another problem. Main problem is that i cannot

I believe that it is an issue with the apache2 configuration or virtual host settings.




floorripper

gilead 01-18-2013 05:23 PM

Have a look in Apache's httpd.conf file for the Listen directive. If it has an IP address, it may not be the one you're using. Try changing it to Listen 80 and re-start Apache to see if that works. There's more info here

acelino 02-01-2013 06:20 AM

please post some snippets on apache log

Quote:

tail -f /var/log/apache2/error.log
tail -f /var/log/apache2/access.log

More step by step Linux Tutorials at <moderated>

Habitual 02-01-2013 09:11 AM

How to change a Wordpress site URL maybe?

and I'd comment out any 'test' IPs in /etc/hosts if you choose to go that route.

fsshl 02-02-2013 09:12 PM

my /etc/hosts
-------------
root@eric-laptop:/home/eric# cat /etc/hosts
127.0.0.1 localhost
127.0.1.1 eric-laptop

# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
----------------------
how should I modify so my two domain, domain1, domain2(both connect to my external(public) ip) will goto 2 different sites of my linux server, one(domain1) goto /var/www/index.html, the other(domain2) goto /var/www/domain2/public_html/index.html
in apache2, ubuntu10.04(2.6.38-10)?

floorripper 02-15-2013 06:42 AM

I have solved the original Issue!

Problem was with my domain registration company. I had to explicitly add to the customer Web interface config:

www.mydomain.com = ip address 1.1.1.1

even though I have already had those two lines:
mydomain.com = ip address 1.1.1.1
*.mydomain.com = ip address 1.1.1.1


they needed to be there www.mydomain.com
in order to work.

Looks strange, but than it started to work.

floorripper 02-15-2013 06:59 AM

two domains on the same server = apache virtualhost
 
Quote:

Originally Posted by fsshl (Post 4883358)
domain1 /var/www/index.html,
domain2 /var/www/domain2/public_html/index.html

:...

In order to run multiple domains on the same ip address, you have to use Apache VIRTUAL HOSTS functionality.
in the directory
/etc/apache2

there are two folders for Vhosts settings.

sites-available/
sites-enabled/


inside should be a default file:
000-default

make vi 000-default


Code:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName www.mydomain1.com
        ServerAlias www.mydomain1.com *.mydomain1.com

        DocumentRoot /var/www/mydomain1.com
        <Directory /var/www/mydomain1.com>
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/mydomain1.com
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>
   
 </VirtualHost>

Importat parts of the configs is :
DocumentRoot you say apache where to look for a index.html.php files. So it can look like this

fsshl 08-03-2013 08:55 PM

although thanks your detailed/advanced reply, my current website/page can not be reached.
I wonder it is because my isp-at&t-Uverse block to my self's apache2 setting make mistake
my public/external ip is 99.116.254.136
please try to pink/trace my address to see whether you can reach me( I already do portforwarding, since my At&t using wire/wireless motorola router).
thanks your help again in advance(I am waiting), EL

911InsideJob 08-04-2013 08:02 AM

That IP is unreachable from here on the Interwebzes. Might want to call the AT&T support number in Richardson, Texas for help, it's 888-510-5545

fsshl 08-04-2013 08:53 AM

have a lightspeed.irvnca.sbcglobal.net stick with my ip
 
is that mean sbcglobal.net block my at&t assigned static ip(through uverse to my Los Angeles home)?
if so, anyone can help me remove that?(in additon to contact At&t?)
EL

floorripper 08-05-2013 06:07 AM

your address is not reachable
 
I am located outside USA and my trace to your address stops here:

12: 12.123.132.213 201.717ms asymm 15

I cannot ping your IP address. According whois it looks like that address was sold by At&t or SBCIS-SBIS, Contact support@swbell.net or ipadmin-sbis@sbc.com.

this 12.123.132.213 also looks like > AT&T Worldnet Services ATTSVI-12-122-0-0 (NET-12-122-0-0-1) 12.122.0.0 - 12.123.255.255.
I do not know any another way how to overcome this issue. Do you host the server on your own or does that another company for you.
Consult it with your hosting - company or with the company which sold the IP address to you. Request them to make that public IP address available. It is also their responsibility to fix it, if they are sold it to you.

The last scenario is:
Did you posted on your homepage some informations which Atat or USA did not like? They could have blocked you.

fsshl 08-09-2013 09:55 PM

although I inform At&t about such port 80 filter, I wonder they will remove/unblock or even reply/reponse to my request.
but I guess we should still have some way to get around it. I use nmap to scan my own public/external ip, I found I have 2 others ports open:
----------
root@eric-laptop:/# nmap -p 1-65535 99.116.254.135

Starting Nmap 5.00 ( http://nmap.org ) at 2013-08-09 08:58 PDT
Interesting ports on 99-116-254-135.lightspeed.irvnca.sbcglobal.net (99.116.254.135):
Not shown: 65532 closed ports
PORT STATE SERVICE
53/tcp open domain
80/tcp filtered http
7547/tcp open unknown

Nmap done: 1 IP address (1 host up) scanned in 11.12 seconds
----------
so can I modify apahce2 or linux kernel/system file to use that 2 opened ports on my pc to broadcast?
EL


All times are GMT -5. The time now is 12:36 PM.