Learn about Centmin Mod LEMP Stack today
Become a Member

Nginx HTTP/2 Problem with Alexa.com

Discussion in 'Nginx, PHP-FPM & MariaDB MySQL' started by Cr0w, Apr 9, 2016.

  1. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    3:44 PM
    1.9.x
    5.5
    when i using http/1 there is't any problem but when i switch to HTTP/2 and redirect http:// to https:// i get this error when i want to verify the Alexavid :


     
  2. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    Contact alexa support to see what they're trying to verify on your site as it should work fine as I do that for Alexa and this forum as well
     
  3. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    3:44 PM
    1.9.x
    5.5
    can i see your *.com.ssl.conf ?
     
  4. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
  5. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    3:44 PM
    1.9.x
    5.5
    well i choose amateurs way :D .
    first i turn back to HTTP/1 Then , claim my site .
    after that i run the HTTP/2 again . is this way good ? or its will be unclaimed soon ? :D
     
  6. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    only a temp measure as alexa does regular re-verifications of the code on all crawled pages of a domain or might do that just for checking alexa code itself and not verification of domain - not sure
     
  7. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    3:44 PM
    1.9.x
    5.5

    Attached Files:

  8. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    As per Getting Started Guide Step 1, did you ensure the server's main hostname is NOT same as any domain name you intend to use for actual web site ?
    from page summary
     
  9. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    3:44 PM
    1.9.x
    5.5
    no . hostname is Aryaii.co
    and website is : Aryaii.com
    and something else my first http1 vhost is disabled ? this is important ? aryaii.com.conf-disabled
    when i enable it and remove the parts in *.com.ssl.conf :
    #server {
    #listen80 ;
    #servername : anything.com www.anything.com;
    #}
    the problem will solve .
     
  10. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    When you create a new nginx vhost domain via centmin.sh menu option 2 or /usr/bin/nv cli command line, you will create the Nginx vhost files and directories. You will get an outputted the path location where it will create the domain name's vhost conf file named newdomain.com.conf (and newdomain.com.ssl.conf if you selected yes to self signed SSL)
    • Nginx vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.conf
    • Nginx HTTP/2 SSL vhost conf path will be at /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf
    • Nginx Self-Signed SSL Certificate Directory at /usr/local/nginx/conf/ssl/newdomain.com
    • Vhost public web root will be at /home/nginx/domains/newdomain.com/public
    • Vhost log directory will be at /home/nginx/domains/newdomain.com/log
    Please post the contents of /usr/local/nginx/conf/conf.d/newdomain.com.conf and /usr/local/nginx/conf/conf.d/newdomain.com.ssl.conf wrapped in CODE tags (outlined at How to use forum BBCODE code tags)
     
  11. Cr0w

    Cr0w Member

    165
    9
    18
    Mar 17, 2015
    Iran
    Ratings:
    +13
    Local Time:
    3:44 PM
    1.9.x
    5.5
  12. eva2000

    eva2000 Administrator Staff Member

    55,404
    12,256
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +18,836
    Local Time:
    10:14 PM
    Nginx 1.27.x
    MariaDB 10.x/11.4+
    looks fine to me in domain.com.ssl.conf changing
    from
    Code (Text):
    #return 302 https://$server_name$request_uri;
    

    to
    Code (Text):
    return 302 https://$server_name$request_uri;
    

    should work if you have domain.com.conf non-https disabled. You can also try re-enable domain.com.conf non-https and just edit it to show
    Code (Text):
     server {
    #      listen   80;
           server_name aryaii.com www.aryaii.com;
           return 302 https://$server_name$request_uri;
    }

    and see if that makes a difference, if it does then you didn't properly disable domain.com.conf

    of course any nginx changes need nginx restart