[Virtualmin AMI on EC2] Apache 2 Test Page

7 posts / 0 new
Last post
#1 Mon, 01/10/2011 - 00:37
hothandao

[Virtualmin AMI on EC2] Apache 2 Test Page

Hi,

I have installed Virtualmin AMI on EC2, the do the system update via YUM. Everything is ok during the updating process. However, when I access any webpage, it returns "Apache 2 Test Page". I am sure that index.html has been put in "/home/100vn/public_html" folder. I have also checked "/etc/httpd/conf/httpd.conf" for apache configuration file, and the virtual host has been generated properly as attachment.

https://www.virtualmin.com/system/files/httpd.conf_.txt

However, the server returns "Apache 2 Test Page" for unknown reason.

Please help me on this situation,

I would appreciate any help!

Mon, 01/10/2011 - 23:45
andreychek

Howdy,

What is the primary IP address of your server (such as what eth0 uses)... is it the "175.41.x.x" that shows up in your config file? Or is it a private IP address?

-Eric

Tue, 01/11/2011 - 00:15 (Reply to #2)
hothandao

Hi,

175.41.x.x is elastic IP from Amazon,

IP address from eth0 is: 10.128.x.x,

If I replace 174.41.x.x:80 with both *:80 or 10.128.x.x:80, I even cannot access the webpage.

I am still stuck at this problem, please help,

Thanks,

Tue, 01/11/2011 - 06:58
andreychek

Howdy,

Okay, so the issue is that you'd need to use the 10.x.x.x address in Apache, rather than the 172.41.x.x address.

Any occurrence of 172.41.x.x in your httpd.con should be replaced with your 10.x.x.x IP.

To fix that for future Virtual Servers -- if you go to System Settings -> Virtualmin Configuration -> Networking settings, make sure that it's using 10.x.x.x for your "Default virtual server IP address".

Also, you'd want "Default IP address for DNS records" to be "Automatically detect external address".

-Eric

Tue, 01/11/2011 - 08:27 (Reply to #4)
hothandao

I have followed your instruction, but the result is 404 on all pages.

I have sent you the login detail via email eric@virtualmin.com, could you please take sometime to find out the problem for me?

Thanks,

Tue, 01/11/2011 - 09:40
andreychek

Well, the remote login service is generally something we provide for Virtualmin Pro customers :-)

Regarding your issue though -- the first thing I'd suggest is making certain that your external IP (172.x.x.x) doesn't exist anywhere in the httpd.conf (in the VirtualHost block or in the NameVirtualHost line). If it does, that can cause the issue you're seeing.

You'd want all occurrences of your IP to look like this:

10.x.x.x:80

Second, after you make all those changes, you'd need to restart Apache. You can do that with the following:

/etc/init.d/httpd restart

That will apply all those changes.

After trying that -- take a look at $HOME/logs/error_log and $HOME/logs/access_log -- do you see anything in there that show any errors, or perhaps at least attempts to access it?

-Eric

Tue, 01/11/2011 - 11:09
hothandao

It works, I just forgot to modify some information in my .htaccess

Thanks so much,

Topic locked