Website not showing

7 posts / 0 new
Last post
#1 Sat, 04/14/2012 - 21:28
Brook

Website not showing

I have reinstalled Virtualmin after an OS reload, and everything installed without errors this time :)

However, my website isn't showing, even though I have uploaded it to the public_html directory of my newly created virtual server. I get this when I go to the url:

Index of /

Name Last modified Size Description
Apache/2.2.3 (CentOS) Server at mysite.org Port 80

This is how I set up Virtualmin (I'm documenting everything incase I ever need to set up an additional server). After installing I...

============
BASIC SET UP
============

Follow first steps walkthrough, then:

> Webmin > Networking -> Network Configuration > Host addresses
- Click on the last one (should be your IP) and add your nameservers
- (Or click on 'Add a new host address' to add different IPs)

> Virtualmin > System settings > Features and Plugins
- Tick the ones you want per account

> Virtualmin > System settings > Server Templates > Default Settings
- Tick the ones you want per account
// Admin user
> Initial Unix shell > Email, FTP, SSH
// Bind DNS domain
> Address records for new domains > Domain name ✓ www.domain
> Does SPF record cover all senders? > Yes, and deny other senders
// Mail for domain
> Mail aliases for new domains > none
> Default quota for mail users > 1000
> Format for usernames that include domain > username@domain
// Apache Website
> Redirect admin.domain to Virtualmin? > no

> Virtualmin > System settings > Server Templates > Account Plans
- Plan name > YOUR PLAN NAME
- Quota for entire server > unlimited

> Virtualmin > System settings > Virtualmin Configuration
// Server settings
> Preload Virtualmin libraries at startup? (Change after no longer needed?)
// Defaults for new domains
> Domain name style in username > Full domain name

> Webmin > Servers > BIND DNS Server > Addresses and Topology
- (Check with 'netstat -an | grep :53 | grep udp' I actually left mine default, but you can...)
> Listed below.. > Addresses (add your ips separated by spaces)

//Everything else left as default//

==================================

Then I created a new virtual server for mydomain.org, and sftp'd some basic html files to public_html, but they don't show, just a directory listing that's not showing any files.

Server templates > Apache website, is set to the default: 'Users' website subdirectory to create Default (public_html)' and 'Permissions on website subdirectory' are 0750. Nothing has been changed there.

Any ideas what's going on? Also, that's all the changes I have made to the default install... is that ok for a production server? Am I missing anything? Or have left any security holes anywhere?

What should the 'Default shared address' be btw? When I got to:
> Virtualmin > Addresses and Networking > Shared IP Addresses
It says: 11.4.9.198 - this is not my IP address, I guess it is the server ip at the DC? Should my public server IP (the one used for nameservers) be there instead? (If so where do I set it?)

Thanks in advance.

Sat, 04/14/2012 - 22:35
andreychek

Howdy,

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

And any idea where it might have gotten that shared IP address you're seeing? If you run the command '/sbin/ifconfig', do you see that IP listed in that output?

That may be the problem though -- if Virtualmin isn't able to determine your correct IP address, it won't be able to correctly configure Apache to respond to requests.

-Eric

Sun, 04/15/2012 - 08:23
Brook

Hi Eirc

This is the output I get:

eth0 Link encap:Ethernet HWaddr 00:0E:2E:E8:E2:4E
inet addr:11.4.9.198 Bcast:11.4.9.199 Mask:255.255.255.252 inet6 addr: fe80::20e:2eff:fee8:e24e/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:61126 errors:0 dropped:0 overruns:0 frame:0 TX packets:31787 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:92263110 (87.9 MiB) TX bytes:2150301 (2.0 MiB) Interrupt:74 Base address:0xa000

eth1 Link encap:Ethernet HWaddr 00:1C:C0:FC:DB:02
inet addr:68.35.8.75 Bcast:68.35.8.75 Mask:255.255.255.248 inet6 addr: fe80::21c:c0ff:fefc:db02/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:100183 errors:0 dropped:0 overruns:0 frame:0 TX packets:75247 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:91772927 (87.5 MiB) TX bytes:30833855 (29.4 MiB) Interrupt:58 Memory:d0700000-d0720000

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:4069 errors:0 dropped:0 overruns:0 frame:0 TX packets:4069 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:463529 (452.6 KiB) TX bytes:463529 (452.6 KiB)

I think eth0 is a rack connection in the datacenter, and eth1 is the connection to the internet (as it has my IP in 'inet addr').

So I have changed:

Virtualmin > Virtualmin Configuration > Networking settings Network interface for virtual addresses - From eth0 to eth1 - and it now works :-)

Thanks very much for your help!

Btw, if you look through my 'basic setup' (in my first post) - can you see anything I've missed? I'm paranoid that I'm leaving some big security hole open or something! (This is my first non-cPanel server).

Cheers,

Sun, 04/15/2012 - 09:49
andreychek

Great, I'm glad it's working now!

Regarding security -- there's not generally anything else you need to do, servers aren't insecure by default.

The thing to do moving forward is to make sure that your server, as well as all the web apps running on it, are always kept up to date -- that's the most common cause of problems.

-Eric

Sun, 04/15/2012 - 10:57
Brook

Thanks Eric!

(BTW are you part of the Virtualmin team? You always seem to answer everyone's posts :-))

Tue, 06/06/2017 - 16:02
Virtual-help

I'm having the same issue. I have two name based virtual hosts on the google cloud. I disabled postfix, dovecot and all of the mail setting because I have had issues with getting it to work. So, I use a different host for mail. Can you please tell me how to troubleshoot Virtualmin?

Updated: I can see Dashbuider (java) but not Wordpress (PHP).

Thanks, Kevin

Tue, 06/06/2017 - 19:10
Virtual-help

I also noticed that most of my custom configurations in the iptables have been removed.

Topic locked