Join the community today
Register Now

PHP PHP 5.6.0 Released

Discussion in 'Nginx and PHP-FPM news & discussions' started by pamamolf, Aug 28, 2014.

  1. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    11:14 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    try chmod 644 the file and see

     
  2. Andy

    Andy Active Member

    542
    89
    28
    Aug 6, 2014
    Ratings:
    +132
    Local Time:
    8:14 PM
    same
     
  3. pamamolf

    pamamolf Premium Member Premium Member

    4,070
    427
    83
    May 31, 2014
    Ratings:
    +832
    Local Time:
    4:14 AM
    Nginx-1.25.x
    MariaDB 10.3.x
  4. Andy

    Andy Active Member

    542
    89
    28
    Aug 6, 2014
    Ratings:
    +132
    Local Time:
    8:14 PM
    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
     
  5. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    11:14 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    do you have proper DNS A record for your host name pointing to your server main IP address ?
     
  6. Andy

    Andy Active Member

    542
    89
    28
    Aug 6, 2014
    Ratings:
    +132
    Local Time:
    8:14 PM
    Yes. I remembered to updated that to point to the main IP.
     
  7. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    11:14 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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.
     
  8. Andy

    Andy Active Member

    542
    89
    28
    Aug 6, 2014
    Ratings:
    +132
    Local Time:
    8:14 PM
    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
     
  9. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    11:14 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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
     
  10. Andy

    Andy Active Member

    542
    89
    28
    Aug 6, 2014
    Ratings:
    +132
    Local Time:
    8:14 PM
    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]
     
  11. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    11:14 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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
     
  12. Andy

    Andy Active Member

    542
    89
    28
    Aug 6, 2014
    Ratings:
    +132
    Local Time:
    8:14 PM
    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.
     
  13. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    11:14 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  14. Andy

    Andy Active Member

    542
    89
    28
    Aug 6, 2014
    Ratings:
    +132
    Local Time:
    8:14 PM
    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;
    .....
     
  15. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    11:14 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    you want hostname ryan redirected to quantnet forums ?? if you did that, then you wouldn't get opcache and other hostname/files served properly
     
  16. Andy

    Andy Active Member

    542
    89
    28
    Aug 6, 2014
    Ratings:
    +132
    Local Time:
    8:14 PM
    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?
     
  17. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    11:14 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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.
     
  18. Andy

    Andy Active Member

    542
    89
    28
    Aug 6, 2014
    Ratings:
    +132
    Local Time:
    8:14 PM
    Understood. Since you are using SSL as well, how do you have the hostname to not redirect to https?
     
  19. eva2000

    eva2000 Administrator Staff Member

    53,614
    12,139
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,683
    Local Time:
    11:14 AM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    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;
    
           }
     
  20. Afterward

    Afterward Member

    94
    29
    18
    Jul 20, 2014
    Ratings:
    +29
    Local Time:
    2:14 AM
    1.7.5
    5.5
    Just upgraded to 5.6.0, flawless as always, no errors.