The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

FastCGI problem

Discussion in 'General Discussion' started by Connor0308, Nov 3, 2015.

  1. Connor0308

    Connor0308 Member

    Joined:
    Nov 1, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany
    cPanel Access Level:
    Root Administrator
    Dear all,

    I face a problem with the configuration of my WHM server when trying to install Seafile.
    It requires to use FastCGI. To do so, I have included a line of

    Code:
    FastCGIExternalServer /var/www/seahub.fcgi -host 127.0.0.1:8000
    to my custom configuration in /usr/local/apache/conf/userdata/ssl/2_4/user/domain/sf.conf.
    Furthermore I enabled the fcgi handler in the PHP and SuExec configuration area.
    Nevertheless I get an error when running

    Code:
    /usr/local/cpanel/bin/build_apache_conf
    Code:
    Failed to generate a syntactically correct Apache configuration.
    Bad configuration file located at /usr/local/apache/conf/httpd.conf.work.7JHdf_LOxS_1eAnJ
    Error:
    Configuration problem detected on line 1 of file /usr/local/apache/conf/userdata/ssl/2_4/user/domain/sf.conf:   Invalid command 'FastCGIExternalServer', perhaps misspelled or defined by a module not included in the server configuration
    
            --- /usr/local/apache/conf/userdata/ssl/2_4/user/domain/sf.conf ---
            1 ===> FastCGIExternalServer /var/www/seahub.fcgi -host 127.0.0.1:8000 <===
            2
            3<VirtualHost *:443>
            4
            5ServerName seafile.example.eu
            6DocumentRoot /home/deubnero/example.eu/seafile
            7Alias /media  /home/sf/web/seafile-pro-server-4.4.5/seahub/media
            --- /usr/local/apache/conf/userdata/ssl/2_4/deubnero/seafile.example.eu/sf.conf ---
    
    What did I do wrong?
    Thank you for your feedback,
    br,

    Connor
     
    #1 Connor0308, Nov 3, 2015
    Last edited by a moderator: Nov 13, 2015
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  3. Connor0308

    Connor0308 Member

    Joined:
    Nov 1, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany
    cPanel Access Level:
    Root Administrator
    Is there any option to install a fcgi or proxy_fcgi appliance?
    Or furthermore - are there experiences on how to install Seafile on a WHM/ cPanel based system?

    Thank you.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  5. Connor0308

    Connor0308 Member

    Joined:
    Nov 1, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany
    cPanel Access Level:
    Root Administrator
    Thank you for this - it worked out.
    Unfortunately, I can't get a https-connection working, as this depends on mod fcgi.
    Any ideas?
    Thank you for your feedback,
    br,

    Connor
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Could you elaborate on the specific error message or issue that's occurring?

    Thank you.
     
  7. Connor0308

    Connor0308 Member

    Joined:
    Nov 1, 2015
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Germany
    cPanel Access Level:
    Root Administrator
    Sorry for that - you are right of course.
    What I am trying to achieve is that I can use SeaFile via HTTPS on sub.domain.tld.
    As I can't use ModFCGI, I want to use a simple set of mod_proxy rewrite rules.
    All
    To do so, I created a seafile.conf in /usr/local/apache/conf/userdata/ssl/2_4/username/sub.domain.tld/seafile.conf to set the VirtualHost on port 443.

    Code:
    ServerAdmin mail-adress
    ServerName sub.domain.tld
    
    SSLEngine On
    
    SSLCertificateFile /var/cpanel/ssl/installed/certs/cerfile
    SSLCertificateKeyFile /var/cpanel/ssl/installed/keys/keyfile
    SSLCACertificateFile /var/cpanel/ssl/installed/cabundles/StartCom_Ltd__3eb90e29$
    CustomLog /usr/local/apache/domlogs/logfile
    LoadModule proxy_module modules/mod_proxy.so
    LoadModule proxy_connect_module modules/mod_proxy_connect.so
    
    RewriteEngine On
    #
    # seafile httpserver
    #
      ProxyPass /seafhttp http://127.0.0.1:8082 retry=0
      ProxyPassReverse /seafhttp http://127.0.0.1:8082
      RewriteRule ^/seafhttp - [QSA,L]
    
    #
    # seafile webdav
    #
      ProxyPassReverse /seafdav http://127.0.0.1:8080
    
    #
    # seahub
    #
      ProxyPass / http://127.0.0.1:8000/
      ProxyPassReverse / http://127.0.0.1:8000
      RewriteRule ^/(media.*)$ /$1 [QSA,L,PT]
    After that, I restarted Apache via service httpd restart.
    I get a message saying

    AH00548: NameVirtualHost has no effect and will be removed in the next release /usr/local/apache/conf/httpd.conf:1026
    [Thu Nov 19 18:47:25.216303 2015] [core:error] [pid 32731] (EAI 2)Name or service not known: AH00547: Could not resolve host name domain.tld/seafilefolder -- ignoring!

    When trying to connect to https://sub.domain.tld, I get a 404 error. Unfortunately, this is also everything which I can get from the logfile.
    So - what do I do wrong?
    Thank you for your ideas,
    br,

    Connor
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You may need to consult with a qualified system administrator for additional advice and assistance for this third-party application if you do not receive additional user-feedback, as there's no native support for it with cPanel.

    Thank you.
     
Loading...

Share This Page