Hello,

I'm a longtime happy user of OpenBSD + stock Apache +
PHP (from packages), but now I have to send a HTTP GET
request from one of my scripts to one host (to appsmail.ru).

So I've added the file /var/www/etc/hosts:

  127.0.0.1       localhost
  94.100.188.5    appsmail.ru www.appsmail.ru

And also have changed this line in /var/www/conf/php.ini:

  allow_url_fopen = On

Unfortunately I still get the error:

Warning: file_get_contents(http://94.100.188.5/robots.txt)
[function.file-get-contents]: failed to open stream: No route to host
in /htdocs/mailru/index.php on line 18

This is because the default route (or at least the route to appsmail.ru)
is unknown to the chrooted Apache. (Script works ok at the console).

So my question is: how do you add a route to chrooted Apache?

I can't just copy /etc/mygate to /var/www/etc/mygate,
I need to exceute the commands similar to /etc/netstart's
from Apache (during its startup?) somehow

Thank you for any hints
Alex

PS: Currently using OpenBSD 4.5-stable and

php5-core-5.2.8p0   server-side HTML-embedded scripting language
php5-gd-5.2.8-no_x11 image manipulation extensions for php5
php5-pgsql-5.2.8    pgsql database access extensions for php5

Reply via email to