首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Privoxy没有保存到日志文件

Privoxy没有保存到日志文件
EN

Unix & Linux用户
提问于 2018-01-31 22:40:07
回答 1查看 1.3K关注 0票数 2

安装privoxy之后,我启动了它,并在指示浏览器作为代理运行它之后,出现了一个错误,说明如下

代码语言:javascript
复制
"There is no Internet connection

There is something wrong with the proxy server, or the address is incorrect."

公平地说,我决定检查日志文件并查看发生了什么,但是日志文件中绝对没有任何内容。

在检查配置文件时,我发现我有以下设置

代码语言:javascript
复制
...
logdir /var/log/privoxy    
logfile logfile
debug     1 # Log the destination for each request Privoxy let through. See also debug 1024.
debug  1024 # Actions that are applied to all sites and maybe overruled later on.
debug  4096 # Startup banner and warnings
debug  8192 # Non-fatal errors
...

好的,它说这应该是登录到/var/log/privoxy目录中的文件日志文件。我检查权限并找到

代码语言:javascript
复制
drwxr-xr-x  2 privoxy privoxy            4096 Jan 31 16:18 privoxy

所以这不是权限问题。我已卸载和重新安装,但没有任何效果。我不知道为什么不起作用。这是登录到系统日志,但我不喜欢挖掘的东西。

就上下文而言,我运行的是Arch。

我发现如果我手动启动它

代码语言:javascript
复制
sudo privoxy --user privoxy --no-daemon /etc/privoxy/config

它运行得很好。所以我认为这是一个系统问题。下面是默认的systemd文件

代码语言:javascript
复制
[Unit]
Description=Privoxy Web Proxy With Advanced Filtering Capabilities
After=network.target

[Service]
User=privoxy
Type=simple
ExecStart=/usr/bin/privoxy --no-daemon /etc/privoxy/config
PrivateDevices=yes

[Install]
WantedBy=multi-user.target
EN

回答 1

Unix & Linux用户

发布于 2018-05-10 06:55:04

似乎是包装问题:https://bugs.archlinux.org/task/54570

看看:https://github.com/systemd/systemd/pull/7198

尝试这个systemd单元文件:

代码语言:javascript
复制
[Unit]
Description=Privoxy Web Proxy With Advanced Filtering Capabilities   
After=network.target   

[Service]
#User=privoxy
#Type=simple
#ExecStart=/usr/bin/privoxy --no-daemon /etc/privoxy/config
#PrivateDevices=yes

Type=forking
PIDFile=/var/run/privoxy.pid
ExecStart=/usr/bin/privoxy --pidfile /var/run/privoxy.pid --user privoxy.privoxy /etc/privoxy/config
ExecStop=/usr/bin/rm /var/run/privoxy.pid
SuccessExitStatus=15
StandardOutput=file:/var/log/privoxy/logfile
StandardError=file:/var/log/privoxy/logfile

[Install]
WantedBy=multi-user.target

https://git.archlinux.org/svntogit/community.git/tree/trunk?h=packages/privoxy

票数 1
EN
页面原文内容由Unix & Linux提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://unix.stackexchange.com/questions/421104

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档