I don’t know what broke! I create a new domain and upload / create an infophp.php file with this content:
<?php
phpinfo();
?>
It WORKS on the two sites I had created months ago but I just created a new site the other day and have troubleshooted this to no end. It’ll show HTML stuff but not PHP, well…now HTML stuff is broke too
The old sites have these directories:
awstats cgi-bin etc fcgi-bin homes logs Maildir public_html tmp
The new sites have ONLY these directories:
awstats cgi-bin homes logs public_html
Soooooooo, CLEARLY something’s “broken”, it doesn’t create the same directories, I’m missing tmp, Maildir, and fcgi-bin
I haven’t updated the OS or webmin until I was having problems, I updated webmin.
Here’s what I’ve got:
Cent OS 5.5
Kernel: 2.6.18-194.el5
Virtualmin version 3.81.gpl GPL
Webmin version 1.520
Real memory 1010.85 MB total, 334.94 MB used
Local disk space 27.10 GB total, 5.14 GB used
Package updates All Virtualmin packages are up to date.
I’m not sure what logs to post, I’m not too into VirtualMin so I don’t know how to look at the scripts that create accounts. I suspect something’s broken in the account creations scripts since some folders aren’t getting created. Lastly, I did try to cp some stuff over from an account that works to see if all it needed was the files but no love, I might not have done something right…not sure.
Anyone have any insight into this weird behavior? I’ve rebooted the server a lot of times
Hmm… what do you see when running PHP code on the domain that’s not working?
Also, if you take a peek in ~/logs/error_log, do you see anything interesting after trying to access your site?
Lastly, you may want to take a peek at the VirtualHost data that was generated for your account in /etc/httpd/conf/httpd.conf, and verify that it looks correct (ie, are the paths and such what you’d expect?).
I’d also like to note that the php info code is broken up here so it’ll display properly, doesn’t look like they like php code in the post
Q: Also, if you take a peek in ~/logs/error_log, do you see anything interesting after trying to access your site?
A: They log files are blank, 0 lines
Both the access_log and error_log are blank on both my test accounts
Statement: Lastly, you may want to take a peek at the VirtualHost data that was generated for your account in /etc/httpd/conf/httpd.conf, and verify that it looks correct (ie, are the paths and such what you’d expect?).
httpd.conf: * Not that xx.xx.xx.xx:80 is a real external IP
Using the ~/username method of accessing a site ends up bypassing the CGI/FCGID+suexec setup, which breaks processing PHP applications.
You may have luck using mod_php, though I’m not certain.
However, a better recommendation would be to instead use an alias for your Virtual Server without DNS.
So if your servers hostname is “hostname.server.tld”, and you need a way of accessing the domain “new_domain.com”, whose DNS isn’t configured yet… you can setup an alias such as “new_domain.server.tld”.
To do that, just go into Create Virtual Server, and create a new alias server.
Also, starting in the next version of Virtualmin, you can have it automatically create new aliases for every Virtual Server that’s created.
Eric, that was exactly the problem! Thank you to all for your help and suggestions. What we did then on our XP Windows machines to “test” the site was to make an entry in our hosts file on XP to point the IP address of our server to the hostname of the test account blah.com or whatever we’re testing…it worked. PHP info showed us what we expected to see.
With CPanel you can do it like that, http://ip/~username so I assumed you could with VirtualMin too