Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

Hi have my brand new LEMP server up and running. So far I have configured 1 website, which is running without problems, configuring the DNS of my domain in godaddy and everything looks good.
Now, I’ve tried to add another website, doing exactly the same as I did for my first WP website, and I can’t make it run.
Whats happening is, when I go on the browser to domain1.com or www.domain1.com, it works well, it goes to the website path that I configured on the server block. But when I go to domain2.com, it opens the website of the domain1.com but without changing the domain on the browser, I mean, on the browser you still can see the domain2.com address, but it loads the site from the domain1.com.
And when I go to www.domain2.com, it loads the main screen of the nginx server.
But when put on the brower the IP of my server, it loads the content of the domain1.com.
I tried everything that I could, but nothing seems to work…any help?
I have a server block with this configuration, in /etc/nginx/sites-available/ and enabled /etc/nginx/sites-enabled/:
server {
server_name www.domain1.com
root /var/www/html/web/web1;
access_log /var/log/nginx/www.domain1.com.access.log;
error_log /var/log/nginx/www.domain1.com.error.log;
include global/common.conf;
include global/wordpress.conf;
}
server {
server_name www.domain2.com;
root /var/www/html/secure/web2;
access_log /var/log/nginx/www.domain2.com.access.log;
error_log /var/log/nginx/www.domain2.com.error.log;
include global/common.conf;
include global/wordpress.conf;
}
I have common.conf file in /etc/nginx/global with this:
# Global configuration file.
# ESSENTIAL : Configure Nginx Listening Port
listen 80;
# ESSENTIAL : Default file to serve. If the first file isn't found,
index index.php index.html index.htm;
# ESSENTIAL : no favicon logs
location = /favicon.ico {
log_not_found off;
access_log off;
}
# ESSENTIAL : robots.txt
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
# ESSENTIAL : Configure 404 Pages
error_page 404 /404.html;
# ESSENTIAL : Configure 50x Pages
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/www;
}
# SECURITY : Deny all attempts to access hidden files .abcde
location ~ /\. {
deny all;
}
# PERFORMANCE : Set expires headers for static files and turn off logging.
location ~* ^.+\.(js|css|swf|xml|txt|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|rss|atom|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off; log_not_found off; expires 30d;
}
And another file in common for the wordpress sites:
# WORDPRESS : Rewrite rules, sends everything through index.php and keeps the appended query string intact
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
# SECURITY : Deny all attempts to access PHP Files in the uploads directory
location ~* /(?:uploads|files)/.*\.php$ {
deny all;
}
# REQUIREMENTS : Enable PHP Support
location ~ \.php$ {
# SECURITY : Zero day Exploit Protection
try_files $uri =404;
# ENABLE : Enable PHP, listen fpm sock
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
# PLUGINS : Enable Rewrite Rules for Yoast SEO SiteMap
rewrite ^/sitemap_index\.xml$ /index.php?sitemap=1 last;
rewrite ^/([^/]+?)-sitemap([0-9]+)?\.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;
009fd274aeae48f2bfbda6ef568676
Cloudstream Apk
032f50ee7f7d489db3b05e204fe139
032f50ee7f7d489db3b05e204fe139
Edward Sitarski
ebeecroft
dashan
34bcef38725b4e6eb5224ae028f17e
markatango
gouskova