FastCGI is enabled. Actually the same server is serving a several wordpress sites as virtual hosts without problems.
According to the link you posted I set up a test.php
to control the $_SERVER
environment which looks like this:
<?php var_export($_SERVER)?>
Now I have two OJS sites (both 2.4.8) with (besides base_url
and database name) identical config.inc.php
:
-
scienca-revuo.info
, the working one. It’s an apache behind a proxying nginx .
-
testo.scienca-revuo.info
, the not yet working plain nginx setup.
Now I do an identical http-request on test.php
to check the $_SERVER
environment.
joh@yksi <0> $ curl scienca-revuo.info/test.php/sr
array (
'HTTP_HOST' => 'scienca-revuo.info',
'HTTP_X_REAL_IP' => '2a01:1e8:e170:fafa:bcab:7b90:b266:96e8',
'HTTP_X_FORWARDED_FOR' => '2a01:1e8:e170:fafa:bcab:7b90:b266:96e8',
'HTTP_X_FORWARDED_PROTO' => 'http',
'HTTP_CONNECTION' => 'close',
'HTTP_USER_AGENT' => 'curl/7.43.0',
'HTTP_ACCEPT' => '*/*',
'PATH' => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
'SERVER_SIGNATURE' => '<address>Apache/2.4.10 (Debian) Server at scienca-revuo.info Port 80</address>
',
'SERVER_SOFTWARE' => 'Apache/2.4.10 (Debian)',
'SERVER_NAME' => 'scienca-revuo.info',
'SERVER_ADDR' => '127.0.0.1',
'SERVER_PORT' => '80',
'REMOTE_ADDR' => '127.0.0.1',
'DOCUMENT_ROOT' => '/srv/www/ojs/site',
'REQUEST_SCHEME' => 'http',
'CONTEXT_PREFIX' => '',
'CONTEXT_DOCUMENT_ROOT' => '/srv/www/ojs/site',
'SERVER_ADMIN' => 'webmaster@scienca-revuo.info',
'SCRIPT_FILENAME' => '/srv/www/ojs/site/test.php',
'REMOTE_PORT' => '53496',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'SERVER_PROTOCOL' => 'HTTP/1.0',
'REQUEST_METHOD' => 'GET',
'QUERY_STRING' => '',
'REQUEST_URI' => '/test.php/sr',
'SCRIPT_NAME' => '/test.php',
'PATH_INFO' => '/sr',
'PATH_TRANSLATED' => 'redirect:/index.php/sr/sr',
'PHP_SELF' => '/test.php/sr',
'REQUEST_TIME_FLOAT' => 1457374457.487,
'REQUEST_TIME' => 1457374457,
)%
and now the nginx one:
joh@yksi <0> $ curl testo.scienca-revuo.info/test.php/sr
array (
'USER' => 'www-data',
'HOME' => '/var/www',
'FCGI_ROLE' => 'RESPONDER',
'PATH_INFO' => '/sr',
'SCRIPT_FILENAME' => '/srv/www/ojs/testo/test.php',
'QUERY_STRING' => '',
'REQUEST_METHOD' => 'GET',
'CONTENT_TYPE' => '',
'CONTENT_LENGTH' => '',
'SCRIPT_NAME' => '/test.php',
'REQUEST_URI' => '/test.php/sr',
'DOCUMENT_URI' => '/test.php',
'DOCUMENT_ROOT' => '/srv/www/ojs/testo',
'SERVER_PROTOCOL' => 'HTTP/1.1',
'GATEWAY_INTERFACE' => 'CGI/1.1',
'SERVER_SOFTWARE' => 'nginx/1.6.2',
'REMOTE_ADDR' => '2a01:1e8:e170:fafa:bcab:7b90:b266:96e8',
'REMOTE_PORT' => '34500',
'SERVER_ADDR' => '2001:4d88:2000:29::affe',
'SERVER_PORT' => '80',
'SERVER_NAME' => 'testo.scienca-revuo.info',
'REDIRECT_STATUS' => '200',
'HTTP_HOST' => 'testo.scienca-revuo.info',
'HTTP_USER_AGENT' => 'curl/7.43.0',
'HTTP_ACCEPT' => '*/*',
'PHP_SELF' => '/test.php/sr',
'REQUEST_TIME_FLOAT' => 1457374543.162689,
'REQUEST_TIME' => 1457374543,
)%
As you see, they are different, but what is the difference that decides whether it works or not.
Thanks.