Report this

What is the reason for this report?

None of my configurations is taking effect on Nginx

Posted on March 15, 2017

I have a dedicated DreamHost Server where I installed a ruby on rails app under /srv directory, I installed nginx with passenger and configured nginx to open my app when I access my domain which is the server name .dreamhost.com. However, it is still showing welcome to nginx page even if I run sudo /etc/init.d/nginx reload or stop or service nginx stop I get no error but nothing changes and I keep getting the welcome page as if the restart or stop didn’t take any effect. Also I tried to remove nginx but nothing changed. This is my /etc/nginx/nginx.conf file:

user www-data;
worker_processes 4;
pid /var/run/nginx.pid;

events {
	worker_connections 768;
	# multi_accept on;
}

http {

	##
	# Basic Settings
	##

	sendfile on;
	tcp_nopush on;
	tcp_nodelay on;
	keepalive_timeout 65;
	types_hash_max_size 2048;
	# 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;

	##
	# nginx-naxsi config
	##
	# Uncomment it if you installed nginx-naxsi
	##

	#include /etc/nginx/naxsi_core.rules;

	##
	# nginx-passenger config
	##
	# Uncomment it if you installed nginx-passenger
	##
	
	passenger_root /home/madrasati/.rvm/gems/ruby-1.8.7-head/gems/passenger-5.1.2;
	passenger_ruby /home/madrasati/.rvm/gems/ruby-1.8.7-head/wrappers/ruby;
#	include /etc/nginx/passenger.conf;

	##
	# 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;
#	}
#}

This is etc/nginx/sites-available/myapp file

server {
	listen 80 default_server;
	server_name www.madrasatie.com *.madrasatie.com ds10316.dreamservers.com;
	passenger_enabled on;
	passenger_app_env production;
	root /srv/fedena_app/fedena_cds/public;
}

And this is /home/madrasatie/nginx/madrasatie:

server {
	listen 80 default_server;
	server_name www.madrasatie.com *.madrasatie.com *.208.97.137.194;
	passenger_enabled on;
	passenger_app_env production;
	root /srv/fedena_app/fedena_cds/public;
}



I tried so many things and nothing is taking effect. Please help me solve this.

The developer cloud

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

Start building today

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