Welcome! Log In Create A New Profile

Advanced

[emerg] unknown directive "server"

Posted by hellodaybyday 
[emerg] unknown directive "server"
February 07, 2013 12:57PM
i am newbie to this NGINX i am installing this MGINX in VPS. my url is : gicsms.com
installing ryby script

1. while installing NGINX using this command $/usr/bin/passenger-install-nginx-module
i am geting this eror

+ Linux 2.6.32-279.11.1.el6.i686 i686
checking for C compiler ... not found

./configure: error: C compiler gcc is not found

--------------------------------------------

It looks like something went wrong


i have update c compailter but it is getting this error..


i have solved this using manuel iinstallation or source installation

2. my main problem is that mginx is not started


$service nginx start (i am using this command to start server)

it is getting this error..
Starting nginx: nginx: [emerg] unknown directive "server" in /etc/nginx/nginx.conf:45 [FAILED]


nignx.conf --------is below

# For more information on configuration, see:
# * Official English Documentation: http://nginx.org/en/docs/
# * Official Russian Documentation: http://nginx.org/ru/docs/

user nobody;
worker_processes 1;

error_log /var/log/nginx/error.log;
#error_log /var/log/nginx/error.log notice;
#error_log /var/log/nginx/error.log info;

pid /var/run/nginx.pid;


events {
worker_connections 1024;
}


http {
include /etc/nginx/mime.types;
default_type application/octet-stream;

log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';

access_log /var/log/nginx/access.log main;

sendfile on;
# tcp_nopush on;

#keepalive_timeout 0;
keepalive_timeout 65;

#gzip on;

# Load config files from the /etc/nginx/conf.d directory
# The default server is in conf.d/default.conf
include /etc/nginx/conf.d/*.conf;

}


server {
listen 80;
listen gicsms.com:80;
server_name gicsms.com;
root/srv/www/gicsms.com/public_html/fedena/public/;
access_log/srv/www/gicsms.com/access.log;
error_log/srv/www/gicsms.com/logs/error.log;
passenger_enabled on;
}


my url is : gicsms.com
installing ryby script..

any one have the solution can be appriciated.
thankyou.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 114
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready