Jump to content
Froxlor Forum

[solved] FCGID, IPs and DocumentRoot


frontline

Recommended Posts

Hello.

 

I have some problems related to [subject] in a new install of Froxlor 0.9.12 (Debian Lenny, with PHP 5.3/MySQL from dotdeb.org).

 

Basic scenario, using Apache2:

- Move Froxlor to: Port (8080), DocumentRoot: /var/www/froxlor

- Move default root for IPs: Port (80), DocumentRoot: /var/www/default

- Mode default root for clients: DocumentRoot: /var/www/vhosts

- Activate FCGID for Froxlor host and IP/clients

 

My problems:

1. Activated FCGID (using http://wiki.froxlor.org/contrib/fcgid-handbook: BTW I think chapter 8 must be removed, Froxlor now has Settings -> FCGID -> Enable FCGID for the Froxlor vhost which seems to do the job).

 

Exec 'ps faux', I can't see user:group

9999     15317  0.0  2.5  98552 10020 ?        S    13:21   0:00  |   \_ /usr/bin/php-cgi -c /var/www/php-fcgi-scripts/froxlor.panel
10000    15334  1.0  2.1  97328  8376 ?        S    13:36   0:00  |   \_ /usr/bin/php-cgi -c /var/www/php-fcgi-scripts/webclient

Exec 'ps faux', I can see user:group

drwxr-xr-x 4 webclient webclient 4096 2010-08-31 12:25 webclient

Any ideea why ? I have no errors in logs. (yes, nscd is configured correctly, I already checked)

 

2. I'm trying to move DocumentRoot of Froxlor on port 8080, to "/var/www/froxlor" (using Edit IP/Port: Own vHost-Settings) and the root is hardcoded to /var/www:

<VirtualHost xxx.xxx.xxx.xxx:8080>
DocumentRoot "/var/www/"
 SuexecUserGroup "froxlorlocal" "froxlorlocal"
 <Directory "/var/www/">
   AddHandler fcgid-script .php
   FCGIWrapper /var/www/php-fcgi-scripts/froxlor.panel/php-fcgi-starter .php
   Options +ExecCGI
   Order allow,deny
   allow from all
 </Directory>
DocumentRoot "/var/www/froxlor"
</VirtualHost>

I think it's normal to specify settings for <Directory "/var/www/froxlor"> instead of <Directory "/var/www/">.

 

3. Same issue as in 2, for the other IPs (Edit IP/Port: Own vHost-Settings: DocumentRoot "/var/www/default/")

<VirtualHost xxx.xxx.xxx.xxx:80>
DocumentRoot "/var/www/"
 SuexecUserGroup "froxlorlocal" "froxlorlocal"
 <Directory "/var/www/">
   AddHandler fcgid-script .php
   FCGIWrapper /var/www/php-fcgi-scripts/froxlor.panel/php-fcgi-starter .php
   Options +ExecCGI
   Order allow,deny
   allow from all
 </Directory>
 DocumentRoot "/var/www/default/"
</VirtualHost>

To solve 2 and 3, it's useful to add in Froxlor a setting for [DocumentRoot] instead of hardcoded /var/www.

 

Waiting for your feedback.

 

Regards,

/Sorin

Link to comment
Share on other sites

The docroot is not hardcoded, it reads the relative path of the files using php-functions dirname() and realpath(); so if you installed Froxlor to /usr/share/www/froxlor, it will use /usr/share/www or /usr/share/www/froxlor (depending on the settings)

 

to 1) please nopaste a customer-vhost

 

to 2) you can set "Access Froxlor directly via the hostname" in the system-settings (which then leads to usage of path /var/www/froxlor instead of /var/www/)

 

to 3) same solution as for 2)

Link to comment
Share on other sites

Hello.

 

Thanks for the answers.

 

1. It's on my test machine, so I'm the customer :). No worries about privacy.

Still, any idea why I don't see user:group on 'ps faux' ?

 

2. "Access Froxlor directly via the hostname" solves only the problem for the Froxlor .conf itself (Port 8080, DocumentRoot "/var/www/froxlor/"). See my reply from below (it's not a general solution).

 

3. "Access Froxlor directly via the hostname" does not solve default hosts/IP (intended: Port 80, DocumentRoot "/var/www/default/").

<VirtualHost xxx.xxx.xxx.xxx:80>
DocumentRoot "/var/www/froxlor/"
 SuexecUserGroup "froxlorlocal" "froxlorlocal"
 <Directory "/var/www/froxlor/">
   AddHandler fcgid-script .php
   FCGIWrapper /var/www/php-fcgi-scripts/froxlor.panel/php-fcgi-starter .php
   Options +ExecCGI
   Order allow,deny
   allow from all
 </Directory>
 DocumentRoot "/var/www/default/"
</VirtualHost>

As you can see, DocumentRoot and <Directory> are still on "/var/www/froxlor/".

 

What do you think about setting the DocumentRoot on [iP/Port] setup ?

Or, read/use DocumentRoot from Own vHost-Settings, IF this setting exists ?

 

Seems that using dirname() and realpath() the results are not as expected.

 

Regards,

/Sorin

Link to comment
Share on other sites

1) nopaste -> copy and Paste to a nopaste-Service like nopaste.froxlor.Org

 

2) nope, this should work of libnss is setup correctly

 

3) you have two DocumentRoot directives in that vhost, wont work, of you Need it to Point to a Directory different from froxlor than you have to manually create a vhost-file Not Managed by froxlor.

 

the ip/Port is Not made for custom docroots, therefore, sorry n? docroots-Setting there.

 

And no, dirname() and realpath() work exactly As we wahres it to

Link to comment
Share on other sites

1) nopaste -> copy and Paste to a nopaste-Service like nopaste.froxlor.Org

Sorry for misunderstanding.

 

 

2) nope, this should work of libnss is setup correctly

Using top commands shows correctly user:group. Weird <_<

 

 

3) you have two DocumentRoot directives in that vhost, wont work, of you Need it to Point to a Directory different from froxlor than you have to manually create a vhost-file Not Managed by froxlor.

Normally, first one is added by Froxlor, then my Own vHost-Settings are added.

My idea is to [find][add] a setting in Froxlor for desired DocumentRoot when adding IP/Port.

 

 

the ip/Port is Not made for custom docroots, therefore, sorry n? docroots-Setting there.

If I do not manage IP/Ports from Froxlor (using my custom vhosts.conf), how can I select the desired combination when I add a domain in Froxlor ? :)

 

Regards,

/Sorin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.



×
×
  • Create New...