Forum Discussion
leoj3n
Jul 15, 2012Aspirant
[Solved] Help set up PHP CGI Environment please
Sorry for the newbie question.
I followed the steps @ http://www.readynas.com/?p=140 ("Setting up a PHP CGI Environment")
I didn't get any errors. At the moment .php files are downloaded by the browser instead of their output being displayed as HTML...
I thought this might be a problem with httpd.conf, .vhost, and related files but after playing with those settings for some time I figured the problem must be elsewhere. That's when I thought to run apache-ssl -f /etc/frontview/apache/httpd.conf -M which output:
Skipping over the warnings, I got the info I was looking for... the php5 module isn't listed in the Loaded Modules section. Does this mean that the "Setting up a PHP CGI Environment" tutorial I followed didn't work properly?
Thanks for any tips you may be able to provide.
--- Update ---
After adding the code
I restarted my NAS and now the error is just permissions (403):
This is the log after reboot before visiting any .php page:
After visiting a .php page:
Here's my complete configuration (/etc/frontview/apache/): http://leoj3n.otzo.com/apache_updated.tar.gz
I followed the steps @ http://www.readynas.com/?p=140 ("Setting up a PHP CGI Environment")
I didn't get any errors. At the moment .php files are downloaded by the browser instead of their output being displayed as HTML...
I thought this might be a problem with httpd.conf, .vhost, and related files but after playing with those settings for some time I figured the problem must be elsewhere. That's when I thought to run apache-ssl -f /etc/frontview/apache/httpd.conf -M which output:
# apache-ssl -f /etc/frontview/apache/httpd.conf -M
[Sat Jul 14 20:49:06 2012] [warn] The Alias directive in /etc/frontview/apache/DefAlias.conf at line 48 will probably never match because it overlaps an earlier Alias.
[Sat Jul 14 20:49:06 2012] [warn] The Alias directive in /etc/frontview/apache/DefAlias.conf at line 48 will probably never match because it overlaps an earlier Alias.
apache-ssl: Could not reliably determine the server's fully qualified domain name, using 10.0.1.2 for ServerName
Loaded Modules:
core_module (static)
authz_host_module (static)
authz_user_module (static)
auth_basic_module (static)
include_module (static)
log_config_module (static)
logio_module (static)
env_module (static)
expires_module (static)
headers_module (static)
setenvif_module (static)
ssl_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
dav_module (static)
status_module (static)
autoindex_module (static)
cgi_module (static)
dav_fs_module (static)
negotiation_module (static)
dir_module (static)
alias_module (static)
rewrite_module (static)
so_module (static)
perl_module (shared)
apreq_module (shared)
addonhandler_module (shared)
authnz_external_module (shared)
auth_sys_group_module (shared)
Syntax OK
Skipping over the warnings, I got the info I was looking for... the php5 module isn't listed in the Loaded Modules section. Does this mean that the "Setting up a PHP CGI Environment" tutorial I followed didn't work properly?
Thanks for any tips you may be able to provide.
--- Update ---
After adding the code
LoadModule php5_module /usr/lib/apache2/modules/libphp5.soto /etc/frontview/apache/httpd.conf, "php5_module" shows up at the end of the list:
AddHandler php5-script .php
AddType text/html .php
#AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
Loaded Modules:
core_module (static)
authz_host_module (static)
authz_user_module (static)
auth_basic_module (static)
include_module (static)
log_config_module (static)
logio_module (static)
env_module (static)
expires_module (static)
headers_module (static)
setenvif_module (static)
ssl_module (static)
mpm_prefork_module (static)
http_module (static)
mime_module (static)
dav_module (static)
status_module (static)
autoindex_module (static)
cgi_module (static)
dav_fs_module (static)
negotiation_module (static)
dir_module (static)
alias_module (static)
rewrite_module (static)
so_module (static)
perl_module (shared)
apreq_module (shared)
addonhandler_module (shared)
authnz_external_module (shared)
auth_sys_group_module (shared)
php5_module (shared)
Syntax OK
I restarted my NAS and now the error is just permissions (403):
Forbidden
You don't have permission to access / on this server.
This is the log after reboot before visiting any .php page:
[Sat Jul 14 21:27:51 2012] [warn] RSA server certificate CommonName (CN) `10.0.1.26' does NOT match server name!?
[Sat Jul 14 21:27:52 2012] [warn] RSA server certificate CommonName (CN) `10.0.1.26' does NOT match server name!?
[Sat Jul 14 21:27:52 2012] [notice] Apache/2.2.6 (Debian) mod_ssl/2.2.6 OpenSSL/0.9.8c DAV/2 PHP/5.2.0-8+etch16 mod_apreq2-20051231/2.6.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations
[Sat Jul 14 21:27:56 2012] [notice] Graceful restart requested, doing restart
[Sat Jul 14 21:27:57 2012] [warn] The Alias directive in /etc/frontview/apache/DefAlias.conf at line 48 will probably never match because it overlaps an earlier Alias.
[Sat Jul 14 21:27:57 2012] [warn] The Alias directive in /etc/frontview/apache/DefAlias.conf at line 48 will probably never match because it overlaps an earlier Alias.
apache-ssl: Could not reliably determine the server's fully qualified domain name, using 10.0.1.2 for ServerName
[Sat Jul 14 21:27:57 2012] [warn] RSA server certificate CommonName (CN) `10.0.1.26' does NOT match server name!?
[Sat Jul 14 21:27:57 2012] [notice] Apache/2.2.6 (Debian) mod_ssl/2.2.6 OpenSSL/0.9.8c DAV/2 PHP/5.2.0-8+etch16 mod_apreq2-20051231/2.6.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations
After visiting a .php page:
[Sat Jul 14 21:27:51 2012] [warn] RSA server certificate CommonName (CN) `10.0.1.26' does NOT match server name!?
[Sat Jul 14 21:27:52 2012] [warn] RSA server certificate CommonName (CN) `10.0.1.26' does NOT match server name!?
[Sat Jul 14 21:27:52 2012] [notice] Apache/2.2.6 (Debian) mod_ssl/2.2.6 OpenSSL/0.9.8c DAV/2 PHP/5.2.0-8+etch16 mod_apreq2-20051231/2.6.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations
[Sat Jul 14 21:27:56 2012] [notice] Graceful restart requested, doing restart
[Sat Jul 14 21:27:57 2012] [warn] The Alias directive in /etc/frontview/apache/DefAlias.conf at line 48 will probably never match because it overlaps an earlier Alias.
[Sat Jul 14 21:27:57 2012] [warn] The Alias directive in /etc/frontview/apache/DefAlias.conf at line 48 will probably never match because it overlaps an earlier Alias.
apache-ssl: Could not reliably determine the server's fully qualified domain name, using 10.0.1.2 for ServerName
[Sat Jul 14 21:27:57 2012] [warn] RSA server certificate CommonName (CN) `10.0.1.26' does NOT match server name!?
[Sat Jul 14 21:27:57 2012] [notice] Apache/2.2.6 (Debian) mod_ssl/2.2.6 OpenSSL/0.9.8c DAV/2 PHP/5.2.0-8+etch16 mod_apreq2-20051231/2.6.0 mod_perl/2.0.2 Perl/v5.8.8 configured -- resuming normal operations
[Sat Jul 14 21:28:51 2012] [error] [client 99.104.49.12] Directory index forbidden by Options directive: /c/public_html/2011cc/
[Sat Jul 14 21:28:51 2012] [error] [client 99.104.49.12] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Sat Jul 14 21:29:00 2012] [error] [client 99.104.49.12] Directory index forbidden by Options directive: /c/public_html/2011cc/
[Sat Jul 14 21:29:00 2012] [error] [client 99.104.49.12] Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
[Sat Jul 14 21:29:06 2012] [error] [client 99.104.49.12] File does not exist: /public_html/leoj3n/favicon.ico
Here's my complete configuration (/etc/frontview/apache/): http://leoj3n.otzo.com/apache_updated.tar.gz
3 Replies
Replies have been turned off for this discussion
- mmcglynn264AspirantI'm OK with a little "sticky." My devices including echos don't play well with the multiple ssid. Especially when I try to use multi room music. I'm currently doing what you mentioned. My main router is triband so I have devices separated based on frequency and range. However, concrete walls really kill the range. Which is why triband mesh won't help. It needs to be ethernet back haul. Plus, the netw cables are already there. I thought nighthawk has mesh built in that it wouldn't be "rigged."
- plemansGuru - Experienced User
There's some nighthawk mesh extenders but they don't function as mesh when hardwired in as AP mode.
as well as they struggle to run mesh with more than 1 extender.
If you're needing more than 1, I'd recommend actually going with a mesh setup like orbi/eero/etc. They can be hardwired in with a wired backhaul and work well in my experience.
- mmcglynn264AspirantInteresting. So my r8000p router is cannot act as part of the mesh as if it's the orbi router? My biggest issue there is that I use all 4 ethernet ports on my router. That's how I'm able to use the access points. So basically, the only way to get true wifi mesh covering the same areas as my current setup with a main router and 2 ap, with ethernet backhaul is to go with entire orbi setup?