My brain is breaking over this. Every site I have is redirecting back to one of my other ones... I would say it was the /default site, but it wasn't until I just made it the default site, which changed nothing. All urls put me back at www.justaleaf.com
(all websites worked prior to transition, and the myhashimotos site was working a little bit ago due to the redirect landing there when I disabled all the other sites)
Here are my configurations (ubuntu with mysql php-fpm)... I'm new to nginx and I'm just lost now:
/etc/nginx/nginx.conf
user www-data;
worker_processes 4;
pid /var/run/nginx.pid;
events {
worker_connections 768;
multi_accept on;
use epoll;
}
http {
##
# Basic Settings
##
sendfile on;
#tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/s;
# server_tokens off;
# server_names_hash_bucket_size 64;
# server_name_in_redirect off;
include /etc/nginx/mime.types;
default_type application/octet-stream;
##
# Logging Settings
##
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
# gzip_vary on;
# gzip_proxied any;
# gzip_comp_level 6;
# gzip_buffers 16 8k;
# gzip_http_version 1.1;
# gzip_types text/plain text/css application/json application/x-javascript text/xml application/xml application/xml+rss text/javascript;
##
# Virtual Host Configs
##
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
#mail {
# # See sample authentication script at:
# # http://wiki.nginx.org/ImapAuthenticateWithApachePhpScript
#
# # auth_http localhost/auth.php;
# # pop3_capabilities "TOP" "USER";
# # imap_capabilities "IMAP4rev1" "UIDPLUS";
#
# server {
# listen localhost:110;
# protocol pop3;
# proxy on;
# }
#
# server {
# listen localhost:143;
# protocol imap;
# proxy on;
# }
#}
directory contents
justaleaf@webserver /etc/nginx/sites-available
$ ls -a
. default www.harmonicult.com .www.justaleaf.com.swp
.. default.dpkg-old www.justaleaf.com www.myhashimotosthyroiditis.com
justaleaf@webserver /etc/nginx/sites-available
$ ls -a ../sites-enabled
. www.justaleaf.com www.myhashimotosthyroiditis.com
.. www.harmonicult.com
And here are my site confs:
/www.myhashimotosthyroiditis.com
Note: to test, just try going to myhashimotosthyroiditis.com, the redirect is obvious there.
The second server in harmonicult has a / in it; line 12 in http://pastie.org/3801824 Pretty sure that's not allowed in server_name.
(Tried to make this as a comment, but I need rep for that, so oh well. Hopefully this helps.)