Discover Centmin Mod today
Register Now

opcache web page

Discussion in 'Other Centmin Mod Installed software' started by cloud9, Oct 15, 2016.

  1. cloud9

    cloud9 Premium Member Premium Member

    435
    118
    43
    Oct 6, 2015
    England
    Ratings:
    +218
    Local Time:
    5:15 AM
    1.25.3
    10.6.x
    Is there a config for this somewhere (other than the php.ini)

    Its pointing to my server hostname and giving a 404 for the url which is confusing me


    Code:
    Password protected server.mydomain.co.uk/b07xx8296daad84d_opcache.php
    -------------------------------------------------------
    
     
    Last edited by a moderator: Oct 16, 2016
  2. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    3:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  3. cloud9

    cloud9 Premium Member Premium Member

    435
    118
    43
    Oct 6, 2015
    England
    Ratings:
    +218
    Local Time:
    5:15 AM
    1.25.3
    10.6.x
    Thanks, main hostname has correct A record for dins set up, alas safari cant connect as cant establish a secure connection, site is set for all SSL so could this be the issue ?
     
  4. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    3:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yes because main hostname is HTTP only without HTTPS :)
     
  5. cloud9

    cloud9 Premium Member Premium Member

    435
    118
    43
    Oct 6, 2015
    England
    Ratings:
    +218
    Local Time:
    5:15 AM
    1.25.3
    10.6.x
    Any way to get it to to run on https ?
     
  6. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    3:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    You could manually do that but the main hostname is the default vhost which means any site on your server which is not configured for HTTPS will redirect to main hostname's HTTPS default index for you and any of your site's visitors if main hostname is configured for HTTPS.

    Are the host.domain.com and HTTPS enabled site also on same top level domain.com ? did you enable HSTS with include subdomain too ? if you did then you're telling browsers to force HTTP to HTTPS redirected connections for domain.com and any *.domain.com subdomain as well

    see Enabling HSTS for SSL for specifics
    As accessing host.domain.com is usually reserved for stats and admin pages the Centmin Mod LEMP stack owner only needs to access, you can just clear your web browser's HSTS record for the domain.com and host.domain.com so the web browser no longer redirects from HTTP to HTTPS. I posted a thread at SSL - How to clear HSTS browser cache | Centmin Mod Community specifically for this :)
     
  7. cloud9

    cloud9 Premium Member Premium Member

    435
    118
    43
    Oct 6, 2015
    England
    Ratings:
    +218
    Local Time:
    5:15 AM
    1.25.3
    10.6.x
    mydomain.conf.ssl

    Code:
    add_header Strict-Transport-Security "max-age=31536000;";
    No subdomain included
     
  8. cloud9

    cloud9 Premium Member Premium Member

    435
    118
    43
    Oct 6, 2015
    England
    Ratings:
    +218
    Local Time:
    5:15 AM
    1.25.3
    10.6.x
    Found it - Shame on me

    My IPB4 Config done by Jimmy

    Code:
    add_header Strict-Transport-Security "max-age=31536000; includeSubdomains;";
    I edited the centmin one but didn't edit this one for the subdomain
     
    Last edited: Oct 16, 2016
  9. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    3:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Yeah HSTS can be tricky hence why it's disabled by default when Centmin Mod generates the HTTPS nginx vhost :)
     
  10. cloud9

    cloud9 Premium Member Premium Member

    435
    118
    43
    Oct 6, 2015
    England
    Ratings:
    +218
    Local Time:
    5:15 AM
    1.25.3
    10.6.x
    Yeah, I know, which is why i removed subdomains from your config and only had domains, missed the IPB conf one though

    Its now disabled (subdomains) and host.mydomain deleted from chrome but same error trying to connect https (have restarted nginx as well)
     
  11. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    3:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    what does your /usr/local/nginx/conf/conf.d/virtual.conf and /usr/local/nginx/conf/conf.d/yourdomain.com.conf contents look like ? Make sure virtual.conf main hostname's server_name isn't same as any added nginx vhost site's domain name as per Getting Started Guide step 1, the main hostname needs to be unique.

    can mask or sanitise your domain names if you want
     
  12. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    3:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    also clear browser cache and restart browser. Test in incognito private browser session
     
  13. cloud9

    cloud9 Premium Member Premium Member

    435
    118
    43
    Oct 6, 2015
    England
    Ratings:
    +218
    Local Time:
    5:15 AM
    1.25.3
    10.6.x
    Code:
    server {
    #         listen   80;
                listen   80 default_server backlog=2048 reuseport;
                server_name server.mydomain.co.uk;
                root   html;
    
    Code:
    server {
    
      server_name mydomain.co.uk www.mydomain.co.uk;
     
  14. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    3:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    oh and obvious check is to make sure *_opcache.php file exists in main hostname's web root at /usr/local/nginx/html (don't list the contents publicly on forums as the random prefixes are meant to be unique for each install). You can always delete your *_opcache.php and next time you run centmin.sh menu option 5 to recompile php it will regenerate a new one with new random prefix
     
  15. cloud9

    cloud9 Premium Member Premium Member

    435
    118
    43
    Oct 6, 2015
    England
    Ratings:
    +218
    Local Time:
    5:15 AM
    1.25.3
    10.6.x
    opcache.php exists and is the correct random prefix
     
  16. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    3:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    use curl in ssh to check headers to confirm
    Code (Text):
    curl -I http://host.domain.com/randomprefix_opcache.php

    Look at location line is it http to https based - it should be http based. If it is then it's working just your browser is still got HSTS HTTP to HTTPS redirect cached it in
     
  17. cloud9

    cloud9 Premium Member Premium Member

    435
    118
    43
    Oct 6, 2015
    England
    Ratings:
    +218
    Local Time:
    5:15 AM
    1.25.3
    10.6.x
    tried clear cache, tried incognito, no joy

    Rebooted and tried again in chrome and now working - go figure !

    Many Thanks @eva2000
     
  18. eva2000

    eva2000 Administrator Staff Member

    54,927
    12,240
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,811
    Local Time:
    3:15 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    yeah local PC reboot might help some folks !