View Full Version : Virtual Host Settings not saving
cyberzen
01-19-2005, 12:35 PM
Hi I just installed server, and I'm trying to set the virtual host
Document Root $VH_ROOT/html/ << from this to
Document Root $VH_ROOT/public_html <<to this
but I cant seem to get it to save, when I click apply changes on the top left hand corner, it then brings me to the service manager, where on the bottom page, under virtual hosts, I see all my virtual hosts as disabled. when i try clicking enable on the right hand column, it doesn't enable it!
Please help!
cyberzen
01-19-2005, 12:44 PM
BTW, does it matter that I am not ussing SSL in the admin interface?
mistwang
01-19-2005, 02:16 PM
Please upgrade to 2.0RC5. :-)
cyberzen
01-19-2005, 03:19 PM
Hmm I did an upgrade when I ran ./install.sh, and now I can't even get to my server on any of my domains. Before the upgrade I could punch in any of my domains and it would go to the default "congragulations page you just installed Lsws"
I went into admin and tried to save the virtual host root, but still cannot save changes. When I try to apply changes it brings me back to service page, but now the service page has no formatting.
Please help
cyberzen
01-19-2005, 03:22 PM
Argh, now I can't even login to admin interface, even after doing a reinstallation. How do I uninstall lsws completely via SSH.
cyberzen
01-19-2005, 03:40 PM
Ok I uninstalled lsws completely, then did a fresh installation of RC5, however Im still having problems in the admin interface. Is this due to javascript? I can never seem to apply changes!
I've tried on IE and firefox, both with javascript enabled
mistwang
01-19-2005, 03:46 PM
Did the confirmation windows pop up? Yes, it uses java-script.
Does "restart" link work?
cyberzen
01-19-2005, 03:51 PM
Also under service management, for virtual host it says disabled - not loaded
cyberzen
01-19-2005, 03:52 PM
I can restart server, but when I try to enable virtual host or reload virtual host, then it just pops up the confirm box, but when I press ok, it doesn';t do anything after reloading the page.
mistwang
01-19-2005, 04:02 PM
any thing in the error log?
Any firewall rules to block connections to port 7000-8000 on localhost?
Please check lsws/logs/stderr.log as well.
cyberzen
01-19-2005, 04:22 PM
got these from tail stderr.log
PHP Warning: socket_connect() unable to connect [111]: Connection refused in /opt/lsws/admin/html.2.0RC5/admin/scripts/Service.php on line 279
failed to connect to server!
PHP Warning: socket_connect() unable to connect [111]: Connection refused in /opt/lsws/admin/html.2.0RC5/admin/scripts/Service.php on line 279
failed to connect to server!
PHP Warning: socket_connect() unable to connect [111]: Connection refused in /opt/lsws/admin/html.2.0RC5/admin/scripts/Service.php on line 279
failed to connect to server!
mistwang
01-19-2005, 04:26 PM
IPtable is configured to block connections to localhost on your server, I believe. Please change your firewall rule, otherwise, you have to restart lsws from command line.
Anything in lsws/logs/error.log?
cyberzen
01-19-2005, 04:54 PM
tail error.log
2005-01-19 14:50:06.220 [NOTICE] [AutoRestarter] child process with pid=2386 exited with status=0!
2005-01-19 14:50:12.300 [NOTICE] Reload configuration for virtual host zenhentai!
2005-01-19 14:50:12.301 [ERROR] [config:vhost:zenhentai] Path for document root is not accessible: /opt/lsws/zhentai/public_html/
2005-01-19 14:50:12.301 [ERROR] [config:vhost:zenhentai] configuration failed!
I tried changing the config for the document root to an absolute path to my home dir, but like I said can't modify it. I'll try modifying my firewall.
mistwang
01-19-2005, 05:05 PM
Please check the permission of that directory, does that directory exist? it is a permission problem which is not related to the function of the web admin interface.
cyberzen
01-19-2005, 05:11 PM
What directory permission should I set for config dir? I've already set document root to 777, and verified that the dir actually exsists
cyberzen
01-19-2005, 05:14 PM
Man, now my listener got problem
005-01-19 16:05:52.786 [INFO] [config:server:basic] For better obscurity, server version number is hidden in the response header.
2005-01-19 16:05:53.094 [ERROR] HttpListener::start(): Can't listen at address adminListener: Address already in use!
2005-01-19 16:05:53.094 [ERROR] HttpServer::addListener(adminListener) failed to create new listener
2005-01-19 16:05:53.094 [ERROR] [config:admin:listener:adminListener] failed to start listener on address *:7080!
2005-01-19 16:05:53.094 [ERROR] [config:admin:listener] No listener is available for admin virtual host!
2005-01-19 16:05:53.095 [ERROR] Fatal error in configuration, exit!
cyberzen
01-19-2005, 05:16 PM
Plus whenever I try to create a new listener, same thing it doesnt save the settings
cyberzen
01-19-2005, 05:21 PM
Perhaps I could edit the xml file myself? Where are the config files for listeners stored?
cyberzen
01-19-2005, 05:33 PM
I edited the admin_config.xml file to make it accept only the IP:7080 but it still giving the same error message.
cyberzen
01-19-2005, 05:37 PM
I noticed this line in error.log
2005-01-19 16:30:54.926 [NOTICE] [ADMIN] server socket: 127.0.0.1:7777
how do I change the localhost address to hardcoded IP? I think this is the one causing problems
mistwang
01-19-2005, 07:10 PM
The permission should be set properly not only for public_html, but also for all of its parent directories, the user that the web server running as should be able to access that directory.
Your changes has been saved to the configuration file, but "public_html" is not accessible, error log shows that already.
For the failed listener problem, please do "killall lshttpd" from command line to make sure all lshttpd process had stoped.
check if any application using port "7080", do "netstat -an | grep 7080".
mistwang
01-19-2005, 07:19 PM
I noticed this line in error.log
2005-01-19 16:30:54.926 [NOTICE] [ADMIN] server socket: 127.0.0.1:7777
how do I change the localhost address to hardcoded IP? I think this is the one causing problems
You cannot and it is not the problem.
The problem is that your firewall rule blocks connections to that address, so you can not apply changes from admin interface.
Your changes made in the admin interface has been saved to configuration file, what you need is just a manual restart from command line.
Then the permission of "/opt/lsws/zhentai/public_html/" is not set properly somewhere alone the path, so lshttpd can not access that directory, fix the permssion problem, then restart web server, you problem should be solved.
Those two problems does not related to each other, you need to fix them one by one. :-)
cyberzen
01-19-2005, 08:58 PM
Ok I turned off my firewall, and also chmod my entire home dir to 777, I reinstalled lsws to home dir under /home/lsws
Basically what I do after install if, I copy the dir DEFAULT to whatever name my domain is like mydomain dir, then I acces web admin and I configure the paths.
I was able to setup one listener, but the rest are not running, virtual hosts are up now tho. It just doesnt seem to be mapping correctly.
Am I doing something wrong?
[/img]
cyberzen
01-19-2005, 09:03 PM
Ok I found out whats wrong, even though I specified document root for one of my domains to be
/home/mydomain/public_html
it's still pointing doc root to
/home/lsws/mydomain/html
why? I've double checked my settings in the web admin and doc root is set to /home/mydomain/public_html
cyberzen
01-19-2005, 09:53 PM
Yay finally got one of my domains working! :) However my other listeners are still not working for my other domains :(
Also I still don't understand why my doc root is still going to /home/lsws/zhentai/html
basically to get it to work I just copied my html files over, so its just a stop gap fix, what i'd really want is to specify that my doc root goes to
/home/zhentai/public_html
any suggestions?
cyberzen
01-19-2005, 10:42 PM
Another problem, is that I put in index.html,index.htm for the index files in general server settings, but when I enter http://mydomain.com/subdir i still cannot access the index.htm file.
cyberzen
01-19-2005, 10:48 PM
YAY finally managed to get everything to work!! Thanks for all your help dude.
cyberzen
01-19-2005, 10:48 PM
BTW found the answer for the index prob, I had to specify in the virtual host setting to use the server setting.
mistwang
01-19-2005, 11:07 PM
Yay finally got one of my domains working! :) However my other listeners are still not working for my other domains :(
Are those listeners started properly, is the listener to vhost mapping set properly? Please check the error log and make proper adjustment.
Also I still don't understand why my doc root is still going to /home/lsws/zhentai/html
basically to get it to work I just copied my html files over, so its just a stop gap fix, what i'd really want is to specify that my doc root goes to
/home/zhentai/public_html
any suggestions?
Make sure permissions for /home and /home/zhentai are set properly in addition to public_html, if those files are owned by another user, then you should let nobody join the group of that user. You really need to read some document and have a good understanding of Unix security model. ;-)
cyberzen
01-20-2005, 05:13 AM
Its a dedicated server, plus I have 34wldsf;ksdf90 password heh
cyberzen
01-21-2005, 03:33 AM
BTW, there still seems to be a bug with the absolute path in Doc root, it's weird man. Is there any limit to how many virtual host one listener can handle? Right now I got 1 listener which maps all my domains, and only 4 domains are working.
Doc root still wants to be in /home/lsws/mydomain/html instead of /home/mydomain/public_html