我试图在我的 raspbian(内核版本 3.10)上结合 apache 2 创建我自己的(本地)firefox-sync 服务器,但是 firefox-sync 抱怨我指定的 url(“ffsync.mraspberrypi.com”)!
我做了什么:
1)首先我遵循这个教程用于设置 Firefox 同步服务器(信息:出于自己的目的将文件夹名称从“syncserver”更改为“ffsyncserver”)。
相关文件修改:
(/opt/ffsyncserver/server-full/development.ini)
[server:main]
use = egg:Paste#http # not sure about what to insert here!
host = localhost # not sure about what to insert here!
port = 5000
use_threadpool = True
threadpool_workers = 60
[app:main]
use = egg:SyncServer
configuration = file:%(here)s/etc/sync.conf
[handler_syncserver_errors]
args = ('/opt/ffsyncserver/server-full/logs/sync-error.log',)
(/opt/ffsyncserver/server-full/etc/sync.conf)
[storage]
sqluri = sqlite:////opt/ffsyncserver/server-full/db/ffsync.db
quota_size = 25600
[auth]
sqluri = sqlite:////opt/ffsyncserver/server-full/db/ffsync.db
allow_new_users = true
[nodes]
fallback_node = http://ffsync.mraspberrypi.com
[smtp]
host = localhost
port = 25
sender = [email protected]
[reset_code]
sqluri = sqlite:////opt/ffsyncserver/server-full/db/ffsync.db
2)之后我使用此命令安装了 Apache 2 以及 mod_wsgi
sudo apt-get install apache2 apache2-doc libapache2-mod-wsgi
相关文件修改:
(/etc/apache2/httpd.conf)
ServerName ffsync.mraspberrypi.com
(创建文件/etc/apache2/conf.d/fqdn)
ServerName ffsync.mraspberrypi.com
我还创建了一个文件 /etc/apache2/sites-available/firefox-sync 并将其链接到文件夹 /etc/apache2/sites-enabled/ 中:
<Directory /opt/ffsyncserver/server-full>
Require all granted
</Directory>
<VirtualHost *:80>
ServerName ffsync.mraspberrypi.com
ServerAdmin [email protected]
DocumentRoot /opt/ffsyncserver/server-full
CustomLog ${APACHE_LOG_DIR}/ffsyncserver_access.log combindes
ErrorLog ${APACHE_LOG_DIR}/ffsyncserver_error.log
WSGIProcessGroup ffsync
WSGIDaemonProcess ffsync user=ffsync group=ffsync processes=2 threads=25
WSGIPassAuthorization On
WSGIScriptAlias / /opt/ffsyncserver/server-full/sync.wsgi
</VirtualHost>
举个例子:启动 apache2 服务器后,我可以使用 RPi 的 IP 查看默认网页,但输入“ffsync.raspberrypi.com”不起作用!
如果我想使用 Firefox-Sync 与上面指定的 url,它会告诉我给定的 url 无效!
所以有什么问题?