5

I am trying to run lynx in my perl cgi script so it extracts some text from wen page. I am doing it as in the following manner in my script,

lynx -source -preparsed "$url" > data.txt

But I get the following error in my server's error_log:

Looking up www.xyz.com

Making HTTP connection to www.xyz.com Alert!:

Unable to connect to remote host.

lynx: Can't access startfile xyz.com

I get the same error when I tried to execute lynx from the command line for root user. But the perl script and the lynx command work normally when I run it in normal user.Our newtwork consists of proxy settings which I had done in /etc/lynx-site.cfg as PROTOCOL_proxy="http://proxy.abcdxyz.ac.in:8080".But it hasnot given any result.

4

1 回答 1

6

如下设置 Lynx 代理:

  1. 编辑/etc/lynx-site.cfg
  2. 添加:

    http_proxy:http://proxy.abc.xyz:8080
    

代理已设置。

于 2015-09-29T05:55:47.483 回答