Website doesn't show up! Help!

Hi,

I purchased the virtualmin pro license, and I believe I've got everything installed correctly.

However, when I go to the domain, instead of seeing my site, I get a empty page that says:

Index of /

Name    Last modified   Size    Description

Could you please give me some help?

Thanks,

Dennis

Status: 
Active

Comments

Howdy -- that's what would normally show up if no files were in the public_html folder.

Can you verify that in $HOME/public_html, that your site's files are indeed there?

If they are, that suggests Apache could be loading the wrong site.

In that case -- how many IP addresses does your server have? And is it behind a NAT router?

Hi!

The files are there, but apache instead of going to /home/user/public_html is going to /var/www/html.

I only have 1 public IP address which is running on an amazon EC2 instance.

The public IP address is working fine, because I can login to virtualmin.

Thanks,

Dennis

If you go into System Settings -> Re-Check Config, does it notice any problems on your server?

Also, what does this command output:

grep '^<VirtualHost' /etc/httpd/conf/httpd.conf

Andrey,

Re-Check Config says:

Your system has 3.67 GB of memory, which is at or above the Virtualmin recommended minimum of 256 MB. Mail server Postfix is installed and configured.

Apache is installed.

Webalizer is installed.

Apache is configured to host SSL websites.

MySQL is installed and running.

ProFTPd is installed.

Logrotate is installed.

SpamAssassin and Procmail are installed and configured for use.

ClamAV is installed and assumed to be running.

The System and Server Status module is installed and checking on schedule.

Plugin AWstats reporting is installed OK.

Plugin DAV Login is installed OK.

Plugin Mailman is installed OK.

Plugin Protected web directories is installed OK.

Using network interface eth0 for virtual IPs.

IPv6 addresses are available, using interface eth0.

Default IP address for virtual servers is 23.21.111.115.

Default IP address is set to 23.21.111.115, which matches the detected external address.

Quotas are not enabled on the filesystem /home which contains home directories under /home and email files under /home. Quota editing has been disabled.

All commands needed to create and restore backups are installed.

Resource limits are supported and configured correctly.

The selected package management and update systems are installed OK.

.. your system is ready for use by Virtualmin.

I'm not sure what you want me to do with the grep command...

In the command line it just goes to a > prompt.

Thanks,

Dennis

Nuts, Drupal mangled the command I had typed out for you to run.

But, I think I see the issue there -- what does this command output:

ifconfig eth0

I suspect it's going to show an internal IP -- but it looks like Virtualmin is trying to place your external IP within Apache.

If that's the case, Apache wouldn't know what domains to direct requests to, so it would be delivering you to a default... which in this case seems to be /var/www.

Let us know what ifconfig eth0 shows, and then if it's an internal IP, we can go over how to fix that!

Andrey:

Looks like this is the problem! Here's the output:

eth0 Link encap:Ethernet HWaddr 12:31:3D:2D:69:3A
inet addr:10.62.86.200 Bcast:10.62.87.255 Mask:255.255.254.0 inet6 addr: fe80::1031:3dff:fe2d:693a/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:352711 errors:0 dropped:0 overruns:0 frame:0 TX packets:189899 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:481202426 (458.9 MiB) TX bytes:22863040 (21.8 MiB) Interrupt:10

Regards,

Dennis

Okay, good, we're on the right track then...

If you go into System Settings -> Virtualmin Config -> Network Settings, what are these 3 options set to:

  • Network interface for virtual addresses

  • Default virtual server IP address

  • Default IP address for DNS records

However, although those may need tweaked, fixing them will only affect new domains.

To resolve existing domains -- what you would need to do is edit /etc/httpd/conf/httpd.conf, and towards the bottom of the file, you'll see some lines that look like this:

<VirtualHost 23.21.111.115:80>

What you would need to do is alter those lines to use your internal IP, rather than external IP. So they should look like this:

<VirtualHost 10.62.86.200:80>

Once you change that, restart Apache:

/etc/init.d/httpd restart

Andrey,

The texts are missing from your last post!

The configuration you asked about is:

Network interface for virtual addresses Detect automatically eth0 Default virtual server IP address From network interface 23.21.111.115 Default IP address for DNS records Same as virtual server IP Network interface for IPv6 addresses Same as IPv4
Netmask size for IPv6 addresses Default (64)

Send me the instructions again, please!

Thanks,

Dennis

Drupal's formatting is going to be the death of me :-)

Okay, take a look again, I think it's showing up properly now.

Regarding the Network Settings -- what you would want to do is tweak these two --

"Default virtual server IP address" should be set to "From network interface".

"Default IP address for DNS records" should be set to "Automatically detect external address".

Andrey,

Thanks!

I'm now a bitter farther down the road.

The server is now pointing in the right place, but I'm getting a blank webpage.

I think it may be a permissions problem with wordpress.

Regards,

Dennis

If WordPress is throwing errors, you should see them in $HOME/logs/error_log.

What error(s) do you see in that logfile whenever you access your site?

Andrey,

The error log is empty and the access log doesn't have anything strange.

However, the site gives a blank page.

Regards,

Dennis

Did you install WordPress using the Install Script?

Usually WordPress would show an error in the logs if it's not working properly, so that's an odd issue!

What if you make a script in your public_html folder named test.php, and add this to it:

<? phpinfo(); ?>

Are you able to run that?

Andrey,

test.php doesn't do anything!

Regards,

Dennis

Andrey,

I changed the php config for the domain to allow files starting with <? and now the test.php works fine.

However, my wordpress site comes up completely blank.

There are now error messages in the error_log.

The readme.html file shows up fine so it's definitely some problem with wordpress.

I copied all the files from the other server to this in a zip file which I unzipped in the public_html folder.

Then I changed the owner to the domain user since it unzipped to root.

I edited the wp-config.php file to point to the new database which I've confirmed is up and running.

Seems pretty crazy to me.

Thanks,

Dennis

Andrey,

Got it all worked out!

It was a problem with a wordpress plugin gone wrong...

Anyway, now I can begin to migrate my other sites.

Thanks a million,

Dennis