Jump to content
Froxlor Forum
  • 0

[solved] AddHandler Problem is back in 0.9.30 :)


snoopotic

Question

Hi.

 

On my Debian Wheezy using php-fpm and using php-fpm on own froxlor-Vhost with froxlor git.

 

I followed the import and upgrade instruction and changed 

/etc/apache2/mods-available/fcgid.conf as instructed.

sadly restarting apache failed: /var/run/apache2 now needs write permission for www-data. But I found out and did a chown root:www-data on /var/run/apache2 as well as gave chmod 775 on /var/run/apache2

 

after that I let rewrite the config...

and chackaboom :) the line:

AddHandler php5-fastcgi .php

is back.

Id shall be changed to:

SetHandler php5-fastcgi

and everything works again :|

 

greets.

 

 

edit: it happens in IP's and port configuration files

edit2: version is 0.9.30 ^^ sorry

Link to comment
Share on other sites

18 answers to this question

Recommended Posts

Nope, this has been tested a lot and all generated configs work as intended. AddHandler is used once in IP/port vhost and customer vhosts use sethandler (or vice versa, cant remember). Maybe you dont have a vhost-container in IP/port???

Link to comment
Share on other sites

Hmm strange. This is getting hard to analyze. 

 

I try to explain, maybe you can retest it:

 

first: I set up a certain IP/port only for use with froxlor and the system hostname. th ip/port config file that gets generated looks like that: (ip and port truncated):

# 10_froxlor_ipandport_192.168.128.84.6472.conf
# Created 27.10.2013 19:56
# Do NOT manually edit this file, all changes will be deleted after the next domain change at the panel.

Listen 192.168.128.84:6472
<VirtualHost 192.168.128.84:6472>
DocumentRoot "/var/www/froxlor-git/"
 ServerName oldfx.localhost.de
  FastCgiExternalServer /var/www/php-fpm/froxlor.panel/oldfx.localhost.de/d300.ssl-fpm.external -socket /var/run/apache2/froxlor.panel-oldfx.localhost.de-php-fpm.socket -idle-timeout 30
  <Directory "/var/www/froxlor-git/">
   <FilesMatch "\.(php)$">
     AddHandler php5-fastcgi .php
     Action php5-fastcgi /fastcgiphp
      Options +ExecCGI
    </FilesMatch>
    Order allow,deny
    allow from all
  </Directory>
  Alias /fastcgiphp /var/www/php-fpm/froxlor.panel/oldfx.localhost.de/d300.ssl-fpm.external
 SSLEngine On
 SSLHonorCipherOrder On
 SSLCipherSuite ECDHE-RSA-AES128-SHA256:AES128-GCM-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH
 SSLVerifyDepth 10
 SSLCertificateFile /etc/ssl/server/oldfx.localhost.de.pem
 SSLCertificateKeyFile /etc/ssl/server/privkey.pem
 SSLCACertificateFile /etc/ssl/server/CaCert_Chain.pem
  SSLCertificateChainFile /etc/ssl/server/CaCert_Chain.pem
</VirtualHost>

having this, the php does not get parsed. The Logs I found do not speak well :/

If I change the Addhandler-Line like described above, it works. php is running. :/ any Idea?

 

If I try to add the system hostname as "Domain" it is not possible...

It seems I am a bit stuck in "how to set up the froxlor vhost". weird. 

 

Do you need more information?

Link to comment
Share on other sites

I got the exact same setup running on my servers and it's working pretty well.

 

10_froxlor_ipandport_*.conf

[...]  
FastCgiExternalServer /var/www/php-fpm/froxlor.panel/froxlor.xyz.de/e163.fpm.external -socket /var/run/apache2/froxlor.panel-froxlor.xyz.de-php-fpm.socket -idle-timeout 100  
<Directory "/var/www/froxlor/">
   <FilesMatch "\.(php)$">
     AddHandler php5-fastcgi .php
     Action php5-fastcgi /fastcgiphp
      Options +ExecCGI
    </FilesMatch>
    Order allow,deny
    allow from all
  </Directory>
  Alias /fastcgiphp /var/www/php-fpm/froxlor.panel/froxlor.xyz.de/e163.fpm.external
[...]
22_froxlor_normal_vhost_*.conf
[...]  
FastCgiExternalServer /var/www/php-fpm/webx/xyz.de/fpm.external -socket /var/run/apache2/webx-xyz.de-php-fpm.socket -idle-timeout 100
  <Directory "/var/www/webs/webx/">
    <FilesMatch "\.php$">
      SetHandler php5-fastcgi
      Action php5-fastcgi /fastcgiphp
      Options +ExecCGI
    </FilesMatch>
    Order allow,deny
    allow from all
  </Directory>
  Alias /fastcgiphp /var/www/php-fpm/webx/xyz.de/fpm.external
[...]
modules.d/70_fastcgi.conf (Gentoo)
<IfModule mod_fastcgi.c>
    FastCgiIpcDir /var/run/apache2/

    <Location "/fastcgiphp">
        Order Deny,Allow
        Deny from All
        # Prevent accessing this path directly
        Allow from env=REDIRECT_STATUS
    </Location>
</IfModule>
 
Link to comment
Share on other sites

having this, the php does not get parsed. The Logs I found do not speak well :/

If I change the Addhandler-Line like described above, it works. php is running. :/ any Idea?

 

If I try to add the system hostname as "Domain" it is not possible...

It seems I am a bit stuck in "how to set up the froxlor vhost". weird. 

 

Do you need more information?

 

You cannot set the system-hostname as customer-domain. That's why most people use 'froxlor.domain.tld' as system-hostname, so they can still use 'domain.tld' as customer (for website, mails ,etc).

Link to comment
Share on other sites

Hmm this is weird. Seems I must describe my settings :D

 

My host has 2 IPs (one is fallback-ip): ip.1 ip.2

 

In system settings I set up:

ip-address: ip.1

defaultip/port: ip.1:80

Hostname: testing.mydomain.tld

"access froxlor directly via the hostname": enabled

"validate domain names": enabled

 

in IP settings I set up following:

ip/port       Listen     NameVirtualHost     vHost-Container     Specialsettings     ServerName     SSL

ip.1:80         x                          x                           x                             -                         x                 -

ip.1:63001   x                          x                           x                             -                         x                 x

ip.1:443       x                          x                           x                             -                         x                 x

 

Now I only want to have froxlor to be reachable under ip.1:63001 thus in this setup I emptied "Custom docroot" (empty = point to Froxlor)

both other IPs got a custom docroot with a index.html :D

 

dns is disabled. I use an other dns that points testing.mydomain.tld to ip.1

in Domain settings of froxlor I can set up other domains without problems. they also run and can be accessed correctly. but only ip.1:63001 or testing.mydomain.tld:63001 does not show php-parsed froxlor it shows the php-code of froxlor...

and the config file for this "virtualHost" is as described above... if I change the Addhandler to SetHandler (and remove the .php ) everything is fine...

 

I really don't get it. I also think it shall work like that but it doesn't.

 

Any ideas?

Link to comment
Share on other sites

hmm I enabled debug logging in apache and wrote a custom line for that vHost to have special logging. the weird part is this on first and last line of a GET request against my froxlor:

 

[Wed Oct 30 21:44:34 2013] [info] [client my.ip] Connection to child 5 established (server testing.mydomain.tld:443)

 

... why the hell port 443?? w00t. if you don't have any Idea where apache gets this (wrong) information, wait I am looking for it :)

 

edit: ok this seems only a logging bug in apache...

idk. doof

Link to comment
Share on other sites

Hey,

 

today my debian made some updates (~300) and since the reboot I got the same problem.

When I try to access the froxlor cp I see the content of the php file.

For customers everything works perfectly and when I change the AddHandler to SetHandler in the froxlor vhost file, everything works in the cp too.

Any Idea why?

 

I changed the line 245 in /var/www/froxlor/scripts/jobs/cron_tasks.inc.http.10.apache.php from

 

                        $this->virtualhosts_data[$vhosts_filename].= '      AddHandler fcgid-script .php' . "\n";

 

to

 

                        $this->virtualhosts_data[$vhosts_filename].= '      SetHandler fcgid-script' . "\n";

 

so the cronjob won?t kill the cp again.

Link to comment
Share on other sites

I asked if you customized anything in the webserver-configs or similar. The THEME has nothing to do with your problem. I can just repeat that many others, including me, have absolutely NO problem with the generated configs.

 

Note: I'm talking about FPM here of course. For FCGID this must in fact really be SetHandler instead of AddHandler. Sorry for the misunderstandings. Fixed in GIT.

Link to comment
Share on other sites

Archived

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



×
×
  • Create New...