Learn about Centmin Mod LEMP Stack 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

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    8:55 AM
    1.11.x
    10.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

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    5:55 PM
    Nginx 1.13.x
    MariaDB 5.5
  3. cloud9

    cloud9 Premium Member Premium Member

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    8:55 AM
    1.11.x
    10.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

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    5:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    yes because main hostname is HTTP only without HTTPS :)
     
  5. cloud9

    cloud9 Premium Member Premium Member

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    8:55 AM
    1.11.x
    10.x
    Any way to get it to to run on https ?
     
  6. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    5:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    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

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    8:55 AM
    1.11.x
    10.x
    mydomain.conf.ssl

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

    cloud9 Premium Member Premium Member

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    8:55 AM
    1.11.x
    10.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
    • Like Like x 1
  9. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    5:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    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

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    8:55 AM
    1.11.x
    10.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

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    5:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
     
    • Like Like x 1
  12. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    5:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    also clear browser cache and restart browser. Test in incognito private browser session
     
    • Like Like x 1
  13. cloud9

    cloud9 Premium Member Premium Member

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    8:55 AM
    1.11.x
    10.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

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    5:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
     
    • Like Like x 1
  15. cloud9

    cloud9 Premium Member Premium Member

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    8:55 AM
    1.11.x
    10.x
    opcache.php exists and is the correct random prefix
     
  16. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    5:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    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
     
    • Like Like x 1
  17. cloud9

    cloud9 Premium Member Premium Member

    140
    54
    28
    Oct 6, 2015
    England
    Ratings:
    +75
    Local Time:
    8:55 AM
    1.11.x
    10.x
    tried clear cache, tried incognito, no joy

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

    Many Thanks @eva2000
     
    • Like Like x 1
  18. eva2000

    eva2000 Administrator Staff Member

    30,178
    6,786
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +10,139
    Local Time:
    5:55 PM
    Nginx 1.13.x
    MariaDB 5.5
    yeah local PC reboot might help some folks !