Connor0308

Member
Nov 1, 2015
9
0
1
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
 
Last edited by a moderator:

Connor0308

Member
Nov 1, 2015
9
0
1
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
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,913
2,203
363
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.