NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.
Forum Discussion
sunsina
Oct 23, 2014Guide
Secure Connection to PyDio (forcing https)
After installing pydio on ReadyNAS through WebGUI, I want to force the pydio GUI be only available over https on port 7127 and any http:7126 connection gets forced directed to https:7127.
The pydio webserver configuration files are installed in (/apps/pydio) directory.
/apps/pydio/http.conf
/apps/pydio/https.conf
After googling and merging a few solutions I modified
http.conf as follows
<VirtualHost *:7126>
ServerName localhost
KeepAlive Off
RewriteEngine On
#RewriteCond %{HTTP_HOST} ^[^\./]+\.[^\./]+$
RewriteRule ^/(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</VirtualHost>
and the https.conf is as follows
<VirtualHost *:7127>
ServerAdmin admin@127.0.0.1
ServerName localhost
SSLEngine on
SSLCertificateFile /etc/ssl/certs/pydio_sina.pem
SSLCertificateKeyFile /etc/ssl/private/pydio_sina.key
DocumentRoot /apps/pydio/web
<Directory "/apps/pydio/web">
Options FollowSymLinks
AllowOverride Limit FileInfo
Order allow,deny
Allow from all
</Directory>
ErrorLog /apps/pydio/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /apps/pydio/pydio_access.log combined
</VirtualHost>
In the apache2 webserver
After executing #apache2ctl -k restart I get following error and none of the http/https web servers works
I get following error
apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.2.41 for ServerName
While the file /etc/hosts contains following line
127.0.0.1 localhost
I would be happy someone show me a better way to solve this problem?
If I should change the contents of any file add/remove some lines I want to know the absolute path of those files.
Thanks
The pydio webserver configuration files are installed in (/apps/pydio) directory.
/apps/pydio/http.conf
/apps/pydio/https.conf
After googling and merging a few solutions I modified
http.conf as follows
<VirtualHost *:7126>
ServerName localhost
KeepAlive Off
RewriteEngine On
#RewriteCond %{HTTP_HOST} ^[^\./]+\.[^\./]+$
RewriteRule ^/(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</VirtualHost>
and the https.conf is as follows
<VirtualHost *:7127>
ServerAdmin admin@127.0.0.1
ServerName localhost
SSLEngine on
SSLCertificateFile /etc/ssl/certs/pydio_sina.pem
SSLCertificateKeyFile /etc/ssl/private/pydio_sina.key
DocumentRoot /apps/pydio/web
<Directory "/apps/pydio/web">
Options FollowSymLinks
AllowOverride Limit FileInfo
Order allow,deny
Allow from all
</Directory>
ErrorLog /apps/pydio/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog /apps/pydio/pydio_access.log combined
</VirtualHost>
In the apache2 webserver
After executing #apache2ctl -k restart I get following error and none of the http/https web servers works
I get following error
apache2: Could not reliably determine the server's fully qualified domain name, using 192.168.2.41 for ServerName
While the file /etc/hosts contains following line
127.0.0.1 localhost
I would be happy someone show me a better way to solve this problem?
If I should change the contents of any file add/remove some lines I want to know the absolute path of those files.
Thanks
2 Replies
Replies have been turned off for this discussion
- super_poussinVirtuosodid you take a look there : /etc/apache2/sites-enabled/ ?
- sunsinaGuideIn the /etc/apache2/sites-enabled I have just a file "090-pydio.conf" (which is a link) to /apps/pydio/http.conf
I am not sure if the line "RewriteRule ^/(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]" in the http.conf does mention that it must listen to port 7127?
Shall I change it to "RewriteRule ^/(.*)$ https://%{HTTP_HOST}:7127/$1 [R=301,L]"
When I execute apache2ctl -k restart I get following error
Syntax error on line 1 of /apps/pydio/https.conf:
<VirtualHost> cannot occur within <VirtualHost> section
Action '-k restart' failed.
The Apache error log may have more information.
While I have no clue where the apache2 error log file is stored!?
Related Content
NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology!
Join Us!