OpenLiteSpeed: Changing Document Root - not working.

1,633 views
Skip to first unread message

przemo1934

unread,
Sep 13, 2013, 5:38:16 AM9/13/13
to openlitespee...@googlegroups.com
Hi!
I recently testing a new version of OpenLiteSpeed (12.4 and 1.2.5) from CentOS 6 openlitespeed repo.
When I add a New VirtualHost I add Virtual Host Root to $SERVER_ROOT/DOMAINS/domain_name (absolute path /usr/local/lsws/DOMAINS/domain_name) and Config File in $VH_ROOT/conf/domain_name.xml

With this settings when I set Document Root in $VH_ROOT/html or $VH_ROOT/something_else it works just fine.

But there a serious problem to change Document Root to another path (not in $VH_ROOT) for example if I set the Document Root in /home/user/domains/html - server does not work properly - it gives mi 404 error.

Is this a limitation of OpenLiteSpeed or a bug? For example in Apache I can change a Document Root of VirtualHost anywhere I wan't. Please help me with this issue.


George Wang

unread,
Sep 13, 2013, 9:52:34 AM9/13/13
to openlitespee...@googlegroups.com
DocRoot must be under $VH_ROOT, if you want to move DocRoot to somewhere
else, move $VH_ROOT accordingly.
> --
> You received this message because you are subscribed to the Google
> Groups "OpenLiteSpeed Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openlitespeed-deve...@googlegroups.com.
> To post to this group, send email to
> openlitespee...@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/openlitespeed-development.
> For more options, visit https://groups.google.com/groups/opt_out.

przemo1934

unread,
Sep 13, 2013, 11:16:27 AM9/13/13
to openlitespee...@googlegroups.com
Ok. But I also can't create $VH_ROOT in another path - only on $SERVER_ROOT (/usr/local/lsws). It's very uncomfortable. If for example put absulute path to as a Virtual Host root like /home/user/ - openlitespeed cannot save configuration file to that directory. Of course I precreate a proper directory and even domain_name.xml empty file  in /home/user/conf/domain_name.xml but openlitespeed don't work with this settings. I can't save a config file - openlitespeed panel gives me "fail to create...path". It's not also permission issue - permission is fine in that directory.

I ask again - It is possible to have $VH_ROOT somewhere else than $SERVER_ROOT?

George Wang

unread,
Sep 13, 2013, 11:38:51 AM9/13/13
to openlitespee...@googlegroups.com
The directory holding configuration file need to be writable by
"lsadmin" user. It may not be a good idea if a user can modify
configuration file directly. I recommend saving all configuration file
under /usr/local/lsws/conf/ .
openlitespeed panel code is running as "lsadm:lsadm" . For security
reason, configuration files should be only writable by "lsadm" user.

przemo1934

unread,
Sep 13, 2013, 11:57:53 AM9/13/13
to openlitespee...@googlegroups.com
Yes, I know that. I do chown -R lsadm:lsadm /home/user/conf
Even this didn't resolve my issue.



W dniu piątek, 13 września 2013 17:38:51 UTC+2 użytkownik George Wang napisał:
The directory holding configuration file need to be writable by
"lsadmin" user. It may not be a good idea if a user can modify
configuration file directly. I recommend saving all configuration file
under /usr/local/lsws/conf/ .
openlitespeed panel code is running as "lsadm:lsadm" . For security
reason, configuration files should be only writable by "lsadm" user.

On 9/13/2013 11:16 AM, przemo1934 wrote:
> Ok. But I also can't create $VH_ROOT in another path - only on
> $SERVER_ROOT (/usr/local/lsws). It's very uncomfortable. If for
> example put absulute path to as a Virtual Host root like /home/user/ -
> openlitespeed cannot save configuration file to that directory. Of
> course I precreate a proper directory and even domain_name.xml empty
> file  in /home/user/conf/domain_name.xml but openlitespeed don't work
> with this settings. I can't save a config file - openlitespeed panel
> gives me "fail to create...path". It's not also permission issue -
> permission is fine in that directory.
>
> I ask again - It is possible to have $VH_ROOT somewhere else than
> $SERVER_ROOT?
> --
> You received this message because you are subscribed to the Google
> Groups "OpenLiteSpeed Development" group.
> To unsubscribe from this group and stop receiving emails from it, send

George Wang

unread,
Sep 13, 2013, 12:15:21 PM9/13/13
to openlitespee...@googlegroups.com
that's due to parent directory permssion, please check /home/user permission.

On 9/13/2013 11:57 AM, przemo1934 wrote:
Yes, I know that. I do chown -R lsadm:lsadm /home/user/conf
Even this didn't resolve my issue.


W dniu pi�tek, 13 wrze�nia 2013 17:38:51 UTC+2 u�ytkownik George Wang napisa�:
The directory holding configuration file need to be writable by
"lsadmin" user. It may not be a good idea if a user can modify
configuration file directly. I recommend saving all configuration file
under /usr/local/lsws/conf/ .
openlitespeed panel code is running as "lsadm:lsadm" . For security
reason, configuration files should be only writable by "lsadm" user.

On 9/13/2013 11:16 AM, przemo1934 wrote:
> Ok. But I also can't create $VH_ROOT in another path - only on
> $SERVER_ROOT (/usr/local/lsws). It's very uncomfortable. If for
> example put absulute path to as a Virtual Host root like /home/user/ -
> openlitespeed cannot save configuration file to that directory. Of
> course I precreate a proper directory and even domain_name.xml empty
> file �in /home/user/conf/domain_name.xml but openlitespeed don't work
> with this settings. I can't save a config file - openlitespeed panel
> gives me "fail to create...path". It's not also permission issue -
> permission is fine in that directory.
>
> I ask again - It is possible to have $VH_ROOT somewhere else than
> $SERVER_ROOT?
> --
> You received this message because you are subscribed to the Google
> Groups "OpenLiteSpeed Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to openlitespeed-development+unsub...@googlegroups.com.
> To post to this group, send email to
> openlitespee...@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/openlitespeed-development.
> For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "OpenLiteSpeed Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlitespeed-deve...@googlegroups.com.

przemo1934

unread,
Sep 13, 2013, 12:22:17 PM9/13/13
to openlitespee...@googlegroups.com
I check this. First I try with user:user to directory /home/user - that failed. Next I try even lsadm:lsadm to /home/user - that failed too.
I can't set all /home to ladm:lsadm owner, setting this for /home/user is not good idea.
So, I understand there isn't some way to achive this?

przemo1934

unread,
Sep 17, 2013, 5:24:02 AM9/17/13
to openlitespee...@googlegroups.com
Why DocRoot must be in $VH_ROOT? I don't see any logical explanation, because apache, nginx and others have it.


Is this a bug or not implemented yet? I don't want't to hold for example wordpress, joomla with my server configuration files

lsmichael

unread,
Oct 8, 2013, 5:02:53 PM10/8/13
to openlitespee...@googlegroups.com
Howdy,

Sorry to get back to you so late. Busy times here. I've got this as a feature request. I'll make sure someone is looking into it. It's not at the top of the list (right now we're pretty concentrated on video streaming and our new API), but I'll keep checking up on it.

Michael

Stefano Balocco

unread,
Oct 8, 2013, 5:35:12 PM10/8/13
to openlitespee...@googlegroups.com
Sorry for the necroposting.
In my configuration (I know, it's Debian but is still Linux) I have document root in /var/www/tld/domain/www/htdocs and I don't have any problem. I simply gave the ownership of the directory to the openlsws webserver user (www-data in my configuration).

Example:
Virtual Host Name tld.domain.www
Virtual Host Root $SERVER_ROOT/sites/tld/domain/www
Config File $VH_ROOT/conf.xml
Document Root /var/www/tld/domain/www/htdocs

$VH_ROOT is owned by lsadm
$DOC_ROOT is owned by www-data (that is the webserver user on Debian).

Maybe require some manual tuning, but can be easily achieved.

Regards,
             Stefano


Il giorno venerdì 13 settembre 2013 15:52:34 UTC+2, George Wang ha scritto:
DocRoot must be under $VH_ROOT, if you want to move DocRoot to somewhere
else, move $VH_ROOT accordingly.


On 9/13/2013 5:38 AM, przemo1934 wrote:
> Hi!
> I recently testing a new version of OpenLiteSpeed (12.4 and 1.2.5)
> from CentOS 6 openlitespeed repo.
> When I add a New VirtualHost I add Virtual Host Root to
> $SERVER_ROOT/DOMAINS/domain_name (absolute path
> /usr/local/lsws/DOMAINS/domain_name) and Config File in
> $VH_ROOT/conf/domain_name.xml
>
> With this settings when I set Document Root in $VH_ROOT/html or
> $VH_ROOT/something_else it works just fine.
>
> But there a serious problem to change Document Root to another path
> (not in $VH_ROOT) for example if I set the Document Root in
> /home/user/domains/html - server does not work properly - it gives mi
> 404 error.
>
> Is this a limitation of OpenLiteSpeed or a bug? For example in Apache
> I can change a Document Root of VirtualHost anywhere I wan't. Please
> help me with this issue.
>
>
> --
> You received this message because you are subscribed to the Google
> Groups "OpenLiteSpeed Development" group.
> To unsubscribe from this group and stop receiving emails from it, send
Reply all
Reply to author
Forward
0 new messages