try chmod 644 the file and see
If you add it on usr/local/nginx and then visit it using http://serverip/30648_opcache.php does it works?
Copy the file to that dir and do hostname/30648_opcache.php and still same 404 error Then do the ip/30648_opcache.php and get a login pop up. I'm using opadmin and the pass found in /usr/local/nginx/conf/htpasswd_opcache but it keeps asking for login/pass. @eva2000
Do you have more than 1 IP address for your server ? i.e. 1 IP for hostname and 1 IP for forum domain ? the default server in virtual.conf for main hostname would catch the hostname usually.
Hum, interesting. ReliableSite.net gives me a block of usable IP Subnet Total IPs Usable IP /29 IP Block 8 IP Addresses 5 IP Addresses The main server IP address is the first IP in the usable IP range. I use this IP to set DNS A record, etc. What I just found out is if I copy that opcache.php to /home/nginx/domains/site.com/public/ then I can access the opcache.php from hostname/opcache.php and domain.com/opcache.php
ah what I suspected, what you need to do is for hostname IP you set in A record for DNS, add that ip to listen field for virtual.conf so it becomes Code: listen ipaddress:80 default_server backlog=2048; where ipaddress is one assigned to A record for hostname. Then restart Nginx web server
Edited /usr/local/nginx/conf/conf.d/virtual.conf so that listen 80 default_server backlog=2048; becomes listen xxx.xxx.xxx.xx:80 default_server backlog=2048; Restart nginx and got these errors Code: nginx.service - SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server Loaded: loaded (/etc/rc.d/init.d/nginx) Active: failed (Result: exit-code) since Sun 2014-09-21 05:02:43 UTC; 7s ago Process: 28587 ExecStop=/etc/rc.d/init.d/nginx stop (code=exited, status=0/SUCCESS) Process: 11592 ExecReload=/etc/rc.d/init.d/nginx reload (code=exited, status=0/SUCCESS) Process: 28596 ExecStart=/etc/rc.d/init.d/nginx start (code=exited, status=1/FAILURE) Main PID: 28539 (code=exited, status=0/SUCCESS) Sep 21 05:02:40 ryan.quantnet.com nginx[28596]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Sep 21 05:02:41 ryan.quantnet.com nginx[28596]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Sep 21 05:02:41 ryan.quantnet.com nginx[28596]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Sep 21 05:02:42 ryan.quantnet.com nginx[28596]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Sep 21 05:02:42 ryan.quantnet.com nginx[28596]: nginx: [emerg] bind() to 0.0.0.0:80 failed (98: Address already in use) Sep 21 05:02:43 ryan.quantnet.com nginx[28596]: nginx: [emerg] still could not bind() Sep 21 05:02:43 ryan.quantnet.com nginx[28596]: [FAILED] Sep 21 05:02:43 ryan.quantnet.com systemd[1]: nginx.service: control process exited, code=exited status=1 Sep 21 05:02:43 ryan.quantnet.com systemd[1]: Failed to start SYSV: Nginx is an HTTP(S) server, HTTP(S) reverse proxy and IMAP/POP3 proxy server. Sep 21 05:02:43 ryan.quantnet.com systemd[1]: Unit nginx.service entered failed state.[/nginx]
is ryan.quantnet.com and forum domain on same ip address ? if not, for forum domain nginx vhost also set to it's specific listen ip address too if same ip, then set it to listen to ip in domain nginx vhost minus the default_server option
ryan.quantnet.com is the hostname. Code: # uname -n ryan.quantnet.com in the DNS A record, @ and ryan all point to the same IP address.
Looks to be working i see the new default Nginx page at Test Page for the Centmin Mod Nginx HTTP Server
Weird. It should redirect to https as it did for me. I did not have any problem with centmin .07 and centos 6.5 Home | QuantNet Community part of the domain.com.conf Code: #Permanently redirect all org/net/info domains to com server { listen 80; listen [::]:80; server_name cn.quantnet.com .quantnet.com .quantnet.us .quantnet.org .quantnet.net .quantnet.info; return 301 $scheme://www.quantnet.com$request_uri; } server { listen 443 default_server deferred spdy; listen [::]:443 default_server deferred spdy ipv6only=on; server_name www.quantnet.com; ssl on; ssl_certificate /usr/local/nginx/conf/conf.d/ssl-unified.crt; ssl_certificate_key /usr/local/nginx/conf/conf.d/ssl.key; ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_session_cache shared:SSL:10m; ssl_session_timeout 1m; .....
you want hostname ryan redirected to quantnet forums ?? if you did that, then you wouldn't get opcache and other hostname/files served properly
Prior to the move, I had the hostname as pma.quantnet.com. 1) going to pma.quantnet.com will be redirected to https://pma.quantnet.com and it shows the xf forum 2) https://pma.quantnet.com/opcache.php will show the file correctly Now, by changing the hostname, the 2) doesn't work anymore. Maybe I get this whole redirect/hostname wrong and going to ryan.quantnet.com shouldn't redirect to https and should show the Test Page for Centmin?
https doesn't work because you have default_server set in 443 listen line AFAIK. Yes hostname should show default Nginx install page The normal correct operation which Centmin Mod is expecting, is hostname ryan is basically a separate site with it's Nginx vhost at /usr/local/nginx/conf/conf.d/virtual.conf and web root at /usr/local/nginx/html which would show the default Nginx index page at /usr/local/nginx/index.html as per Getting Started Guide. It should not be redirecting to any other site as it's where you access all your opcache, apc cache, memcached and other server files ie. if you install phpmyadmin via addon it is auto setup to be served from hostname location. If you want to access the files on your domain, you should copy or move them from /usr/local/nginx/html web root to your domain's web root at /home/nginx/domains/domainname.com/public.
Just leave it as is untouched in virtual.conf from initial install - then it should be non-https served i.e. Code: server { # listen 80; listen 80 default_server backlog=2048; server_name hostname.domain.com; root html; access_log /var/log/nginx/localhost.access.log main buffer=32k; error_log /var/log/nginx/localhost.error.log error; # ngx_pagespeed & ngx_pagespeed handler #include /usr/local/nginx/conf/pagespeed.conf; #include /usr/local/nginx/conf/pagespeedhandler.conf; #include /usr/local/nginx/conf/pagespeedstatslog.conf; # limit_conn limit_per_ip 16; # ssi on; location / { # block common exploits, sql injections etc #include /usr/local/nginx/conf/block.conf; # Enables directory listings when index file not found # autoindex on; # Shows file listing times as local time # autoindex_localtime on; # Enable for vBulletin usage WITHOUT vbSEO installed # try_files $uri $uri/ /index.php; } # example nginx-http-concat # /csstest/??one.css,two.css #location /csstest { #concat on; #concat_max_files 20; #} include /usr/local/nginx/conf/staticfiles.conf; include /usr/local/nginx/conf/php.conf; #include /usr/local/nginx/conf/phpstatus.conf; include /usr/local/nginx/conf/drop.conf; #include /usr/local/nginx/conf/errorpage.conf; }