Adding domain name to a one-click Wordpress website

edited November 2 in Features and Ideas

I'm having a difficult time getting this to work.

I have a managed Wordpress instance on Vultr. I was able to access the website fine with its ip address. Now after adding the domain, I can't access the website, "this site can't be reached, server IP address could not be found." The ip address does indeed redirect to the domain name though, it's probably due to the configuration in nginx.

I've followed all the steps on the Vultr documentation, https://www.vultr.com/docs/install-lets-encrypt-ssl-on-one-click-wordpress-app?gclid=CjwKCAjw0vTtBRBREiwA3URt7iqQFmNPbr6H8pL70Oyc5ndqzhl2jp-DlhWfOC-MjsBOI6MAV46UPhoCGkgQAvD_BwE

I've changed the site url & home url in Wordpress, and followed all the steps provided in this vultr discussion as well, https://discuss.vultr.com/discussion/1869/how-to-change-wordpress-homepage-url-from-ip-address-to-the-domain-name

In Google domains, I have added both A and AAAA resource records.

What else have I missed?

Comments

  • Here is my configuration from /etc/nginx/conf.d/wordpress_http.confg:

    upstream php-handler-http {
        server 127.0.0.1:9000;
        #server unix:/var/run/php5-fpm.sock;
    }
    
    server {
      if ($scheme = http) {
        return 301 https://$server_name$request_uri;
      }
      if ($host = yimbydemssd.com) {
        return 301 https://$host$request_uri;
      } # managed by Certbot
    
        listen 80 default_server;
        server_name yimbydemssd.com;
        #server_name wordpress.example.com;
    
        root /var/www/html/;
        index index.php;
    
        # set max upload size
        client_max_body_size 2G;
        fastcgi_buffers 64 4K;
    
        access_log /var/log/nginx/wordpress_http_access.log combined;
        error_log /var/log/nginx/wordpress_http_error.log;
    
        location = /favicon.ico {
            log_not_found off;
            access_log off;
        }
    
        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
        }
    
        location / {
            try_files $uri $uri/ /index.php?$args ;
        }
    
        location ^~ /wp-admin/ {
            auth_basic "Restricted";
            auth_basic_user_file /etc/nginx/htpasswd/wpadmin;
    
            location ~* \.(htaccess|htpasswd) {
                deny all;
            }
    
            location ~ \.php(?:$|/) {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_pass php-handler-http;
                fastcgi_read_timeout 60s;
            }
        }
    
        location ~* \.(htaccess|htpasswd) {
            deny all;
        }
    
        location ~ \.php(?:$|/) {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_pass php-handler-http;
            fastcgi_read_timeout 60s;
        }
    
        # set long EXPIRES header on static assets
        location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
            expires 30d;
            access_log off;
        }
    }
    


  • Here is my configuration from /etc/nginx/conf.d/wordpress_http.confg:

    upstream php-handler-https {
        server 127.0.0.1:9000;
        #server unix:/var/run/php5-fpm.sock;
    }
    
    server {
        listen 443 ssl default_server;
        server_name yimbydemssd.com;
        #server_name wordpress.example.com;
      ssl_certificate /etc/letsencrypt/live/yimbydemssd.com/fullchain.pem; # managed by Certbot
      ssl_certificate_key /etc/letsencrypt/live/yimbydemssd.com/privkey.pem; # managed by Certbot
    
        root /var/www/html/;
        index index.php;
    
        # set max upload size
        client_max_body_size 2G;
        fastcgi_buffers 64 4K;
    
        access_log /var/log/nginx/wordpress_https_access.log combined;
        error_log /var/log/nginx/wordpress_https_error.log;
    
        location = /favicon.ico {
            log_not_found off;
            access_log off;
        }
    
        location = /robots.txt {
            allow all;
            log_not_found off;
            access_log off;
        }
    
        location / {
            try_files $uri $uri/ /index.php?$args ;
        }
    
        location ^~ /wp-admin/ {
            auth_basic "Restricted";
            auth_basic_user_file /etc/nginx/htpasswd/wpadmin;
    
            location ~* \.(htaccess|htpasswd) {
                deny all;
            }
    
            location ~ \.php(?:$|/) {
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                include fastcgi_params;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                fastcgi_param PATH_INFO $fastcgi_path_info;
                fastcgi_param HTTPS on;
                fastcgi_pass php-handler-https;
                fastcgi_read_timeout 60s;
            }
        }
    
        location ~* \.(htaccess|htpasswd) {
            deny all;
        }
    
        location ~ \.php(?:$|/) {
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
            include fastcgi_params;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_param PATH_INFO $fastcgi_path_info;
            fastcgi_param HTTPS on;
            fastcgi_pass php-handler-https;
            fastcgi_read_timeout 60s;
        }
    
        # set long EXPIRES header on static assets
        location ~* \.(?:jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ {
            expires 30d;
            access_log off;
        }
    }
    


  • edited November 3

    @jsphkm Within the wordpress configuration you have the site as "www.yimbydemssd.com". When you call the site with any other name, wordpress directs you to the "proper" name, as configured.


    You'll note, that when you go to yimbydemssd.com the 'domain not found' is for the address www.yimbydemssd.com

    Simply put, you've registered in the dns the ip for "yimbydemssd.com" but not "www.yimbydemssd.com" , so you'll need to add that to your DNS too (same IP address), then your "Yes, In my back yard Democrats of San Diego County" site should appear!

    By the way, your IPv6 server isn't working!

Sign In or Register to comment.