Hi There
Wordpress Installation based on Nginx.
I recently set up my Dns records and my site has a strange behavior.
If you try to connect to the domain name: ggtest.it you go to the site but the browser shows the Ip Address instead of the domain name!
Here is my Nginx configuration
server { listen 80 default_server; listen [::]:80 default_server ipv6only=on;
root /var/www/html;
index index.php index.html index.htm;
# Make site accessible from http://localhost/
server_name ggtest.it www.ggtest.it;
# Per aumentare la capacità di caricamento in wordpress
client_max_body_size 32M;
location = /xmlrpc.php {
deny all;
}
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ =404;
try_files $uri $uri/ /index.php?q=$uri&$args;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
Have you any idea about what this can be due to?
Have you any suggestion to sort the problem?
Thanks!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
This will occur if your WordPress settings have the IP address set as the domain name and base_url. You can find this inside the settings in wp-admin.
What happens is that WordPress has a set URL in it’s settings. When a request comes in that hits WordPress but does not match the configured base_url it redirects to the configured URL, in this case, the IP address.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.