systemOS:debian 9.6 amd64
seafile pro version :6.2.13
sudo vi /etc/apache2/sites-enabled/000-default.conf
设置文件如下:
<VirtualHost *:80>
ServerName 192.168.12.128
DocumentRoot /var/www
Alias /media /opt/seafile/seafile-server-latest/seahub/media
RewriteEngine On
<Location /media>
Require all granted
#’ seafile fileserver
ProxyPass /seafhttp fcgi://localhost:8082/
ProxyPassReverse /seafhttp fcgi://localhost:8082/
RewriteRule ^/seafhttp - [QSA,L]
#’ seafile webdav
SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
ProxyPass / fcgi://localhost:8080/
#’ seahub
SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
ProxyPass / fcgi://localhost:8000/
<VirtualHost *:443>
ServerName 192.168.12.128
DocumentRoot /var/www
Alias /media /opt/seafile/seafile-server-latest/seahub/media
RewriteEngine On
SSLEngine On
SSLCertificateFile /home/lijinan/server.crt
SSLCertificateKeyFile /home/lijinan/server.key
<Location /media>
Require all granted
#’ seafile fileserver
#’
ProxyPass /seafhttp fcgi://localhost:8082/
ProxyPassReverse /seafhttp fcgi://localhost:8082/
RewriteRule ^/seafhttp - [QSA,L]
#’ seafile webdav
RewriteCond %{HTTP:Authorization} (.+)
ProxyPass /seafdav http://localhost:8080/seafdav
ProxyPassReverse /seafdav http://localhost:8080/seafdav
#’ seahub
SetEnvIf Request_URI . proxy-fcgi-pathinfo=unescape
SetEnvIf Authorization “(.*)” HTTP_AUTHORIZATION=$1
ProxyPass / fcgi://localhost:8000/
http://localhost:8080/seafdav, https://localhost:443/, https://localhost:443/seafdav 访问正常。
http://localhost:80/, and http://localhost:80/seafdav, and http://localhost:8000均无法访问;不知哪位碰到过该问题并解决的?多谢。