• Hi my champion frieends.

    I’m starting a site at TLD.net. It continuelly redirects, causign a loop i think.

    Its on the AWS server, EC2. The Target Group HTTP forwards traffic to HTTPS.

    In the NGINX code, i have this on page /etc/nginx/conf.d/www.ads-software.com:

    map $blogname $blogid{ default -999;

    #Ref: https://www.ads-software.com/extend/plugins/nginx-helper/ include 
    #/var/www/wordpress/wp-content/plugins/nginx-helper/map.conf ;

    }

    server { server_name integritytoysales.net ;

    root /var/www/html/wordpress/integritytoysales.net/htdocs; index index.php;
    
    location ~ ^(/[^/]+/)?files/(.+) { try_files /wp-content/blogs.dir/$blogid/files/$2
        /wp-includes/ms-files.php?file=$2 ; access_log off; log_not_found off; expires
        max;
    }
    
    #avoid php readfile()
    location ^~ /blogs.dir { internal; alias
        /var/www/html/wordpress/integritytoysales.net/htdocs/wp-content/blogs.dir ; access_log >
        off; expires max;
    }
    
    if (!-e $request_filename) { rewrite /wp-admin$ $scheme://$host$request_uri/
        permanent; rewrite ^(/[^/]+)?(/wp-.*) $2 last; rewrite ^(/[^/]+)?(/.*\.php) $2
        last;
    }
    
    location / { try_files $uri $uri/ /index.php?$args ;
    }
    
    location ~ \.php$ { try_files $uri =404; include fastcgi_params; fastcgi_pass php;
    }

    Alsok i have this in /etc/nginx/conf.d/###.net.conf:

    server { listen 80; root /var/www/html/wordpress; server_name integritytoysales.net; return 301
    https://$server_name$request_uri;
    }
    listen 443 ssl; managed by Certbot ssl_certificate

    /etc/letsencrypt/live/integritytoysales.net/fullchain.pem;

    managed by Cer>

    ssl_certificate_key /etc/letsencrypt/live/integritytoysales.net/privkey.pem;

    managed by C>

    include /etc/letsencrypt/options-ssl-nginx.conf; managed by Certbot

    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

    managed by Certbot

    }
    server { if ($host = integritytoysales.net) { return 301 https://$host$request_uri;
    } managed by Certbot

    listen 80; server_name integritytoysales.net; return 404; managed by Certbot

    }

    *****
    I have added these codes from sourcers on the internet. But htere is no tutorial based on launching a fresh wordpress and changing it to multisite for nginx codes in /etc/nginx/conf.d files.

    Anyone know what i should be doing? Becuase i dont. ??

    Thanks

    Steve

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Steven Cooper

    (@kingcooper)

    So, if i have it forward to HTTPS from HTTP in Listener and Target Group at AWS, does this mean i should not have any of those codes in /etc/nginx/conf.d/####.conf ????

    Is the nginx code seperated from the AWS server listener and target group listener?

    I have some success with getting the site up, instead of endless redirects. When i achieved that i had code in /etc/nginx/conf.d/wordpress.conf file.
    Although i edited the code from what was suggested to add. It was code from 2022, so i feel it was probably out of date. I cant seem to find that code atm.

    But, its not clear on what i add to the /etc/nginx/conf.d/wordpress.conf file.
    And its not clear if i need both …/nginx/conf.d/wordpresss.conf and nginx/conf.d/###.net.conf files to work ok.

    And, do i setup for single site to start. And change over the nginx/conf.d files as i progress into multisite?

    These tutorials i find online, they are awesome with the amount of work in to them. But for a dummy like me i find it difficult to read between the lines when they omitt some of the deets.

    Any help? CHeers

    Steve

    Why is your domain returning three different IP addresses simultaneously? Is this how your AWS infrastructure is set up?

    Thread Starter Steven Cooper

    (@kingcooper)

    Hi there, i have changed to apache now, got out of nginx. Im more familiar with apache…

    No, i didnt know the domain is showing three ip addresses.
    Is it because my SSL certificate has three domain names, but they are not mapped yet in Route 53 DNS mapping?

    Should i remove the other domain s in the SSL certificate to start?

    I have installed apache now, ill open another more specific ticket about that.

    Thanks George, appreciated.

    Steve

    Thread Starter Steven Cooper

    (@kingcooper)

    Its all working fine now. Sohappy.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘AWS, NGINX’ is closed to new replies.