“server” directive is not allowed here in /usr/local/apps/nginx/etc/conf.d/, what i did wrong here ? (0 Replies, Read 16 times)nginx-1.2.2 compilation error make[1]: Entering directory `/usr/local/src/nginx sed -e "s|%%PREFIX%%|nginx change root folder for specyfic urlVagrant / puppet config for complex vhost setting (if statements etc.)?Can multi laravel based sites be accessed by folder not by port?Share Nginx server configurationI'm trying to setup Moodle 2.3 (not 2.5) ver with nginx latest buildnginx 502 Bad Gateway after rails deployWordpress constant redirect with nginx upstreamThere is no nginx under usr/local path, so where is the default nginx server path?Nginx (111: Connection refused) while connecting to upstream; YunoHost / Duniter

Patience, young "Padovan"

Why is the design of haulage companies so “special”?

What do you call a Matrix-like slowdown and camera movement effect?

least quadratic residue under GRH: an EXPLICIT bound

What do you call something that goes against the spirit of the law, but is legal when interpreting the law to the letter?

Circuitry of TV splitters

Can an x86 CPU running in real mode be considered to be basically an 8086 CPU?

How can bays and straits be determined in a procedurally generated map?

How to report a triplet of septets in NMR tabulation?

Why are 150k or 200k jobs considered good when there are 300k+ births a month?

Is it possible to make sharp wind that can cut stuff from afar?

How is this relation reflexive?

A newer friend of my brother's gave him a load of baseball cards that are supposedly extremely valuable. Is this a scam?

Modification to Chariots for Heavy Cavalry Analogue for 4-armed race

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

Banach space and Hilbert space topology

Prevent a directory in /tmp from being deleted

The magic money tree problem

Download, install and reboot computer at night if needed

Why was the small council so happy for Tyrion to become the Master of Coin?

How did the USSR manage to innovate in an environment characterized by government censorship and high bureaucracy?

Can a German sentence have two subjects?

Why Is Death Allowed In the Matrix?

Do airline pilots ever risk not hearing communication directed to them specifically, from traffic controllers?



“server” directive is not allowed here in /usr/local/apps/nginx/etc/conf.d/, what i did wrong here ? (0 Replies, Read 16 times)


nginx-1.2.2 compilation error make[1]: Entering directory `/usr/local/src/nginx sed -e "s|%%PREFIX%%|nginx change root folder for specyfic urlVagrant / puppet config for complex vhost setting (if statements etc.)?Can multi laravel based sites be accessed by folder not by port?Share Nginx server configurationI'm trying to setup Moodle 2.3 (not 2.5) ver with nginx latest buildnginx 502 Bad Gateway after rails deployWordpress constant redirect with nginx upstreamThere is no nginx under usr/local path, so where is the default nginx server path?Nginx (111: Connection refused) while connecting to upstream; YunoHost / Duniter






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








1















i got this Error :



"server" directive is not allowed here in /usr/local/apps/nginx/etc/conf.d/mydomain.com.conf:1 
nginx: configuration file /usr/local/apps/nginx/etc/nginx.conf test failed


i use with Webuzo control panel + Lemp Stack from there .
this what i did...
i configured nginx.conf to this settings:



 #user www-data;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

pid /usr/local/apps/nginx/var/log/nginx.pid;

events
worker_connections 1024;



http

# Let NGINX get the real client IP for its access logs
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;


# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
client_max_body_size 15m;
client_body_timeout 60;
client_header_timeout 60;
client_body_buffer_size 1K;
client_header_buffer_size 1k;
large_client_header_buffers 4 8k;
send_timeout 60;
reset_timedout_connection on;
types_hash_max_size 2048;
server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /usr/local/apps/nginx/etc/mime.types;
default_type application/octet-stream;

# Logging Settings
error_log /usr/local/apps/nginx/var/log/error_log debug;
access_log /usr/local/apps/nginx/var/log/web.access.log;

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

# Gzip Settings
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 512;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/css text/javascript text/xml text/plain text/x-component
application/javascript application/x-javascript application/json
application/xml application/rss+xml font/truetype application/x-font-ttf
font/opentype application/vnd.ms-fontobject image/svg+xml;

include /usr/local/apps/nginx/etc/conf.d/*.conf;



and after that i checked with nginx -t and it was ok...



I continued to the next file mydomain.com.conf and this what i putted there:



server 
listen 127.0.0.1:8080;
server_name mydomain.com;

port_in_redirect off;
server_tokens off;
autoindex off;

client_max_body_size 15m;
client_body_buffer_size 128k;

access_log /usr/local/apps/nginx/var/log/mydomain.com.log main;
error_log /usr/local/apps/nginx/var/log/mydomain.com.err;

root /home/www-data/public_html;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php;

error_page 404 /404.html;
location = /404.html
root /usr/local/apps/nginx/etc//html;


# Define default caching of 24h
expires 86400s;
add_header Pragma public;
add_header Cache-Control "max-age=86400, public, must-revalidate, proxy-revalidate";

# Redirect server error pages to static 50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html
root /usr/local/apps/nginx/etc//html;


# Don't log robots.txt requests
location = /robots.txt
allow all;
log_not_found off;
access_log off;


# Rewrite for versioned CSS+JS via filemtime
location ~* ^.+.(css

location ~* (^(?!(?:(?!(php|inc)).)*/uploads/).*?(php))
try_files $uri = 404;
fastcgi_split_path_info ^(.+.php)(.*)$;
fastcgi_pass unix:/var/run/php-fpm.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include /usr/local/apps/nginx/etc/fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;


}


and WebuzoVH.conf
code:






# DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO.

server
listen 80;
server_name mydomain.com www.my domain.com;
# The Document Root
root /home/www-data/public_html;
error_log /usr/local/apps/nginx/var/log/mydomain.com.err;
access_log /usr/local/apps/nginx/var/log/mydomain.com.log main;
include /usr/local/apps/nginx/etc/conf.d/common;





what wrong here , how can I fix that ?



i sit on that almost 5 hours :-(



thanks for all who can help me,
Tomer.










share|improve this question
























  • What does "(0 Replies, Read 16 times)" refer to in your title?

    – Kevin B
    Dec 23 '14 at 19:52











  • Did you use a http context and put server block inside that? like http ... server

    – dev0z
    Dec 23 '14 at 20:15











  • I FORGOT TO ADD THE content of Nginx.conf but now it's show... so if you can see again i appreciate that thanks..

    – Tomer Cohen
    Dec 24 '14 at 0:56












  • Do you have other *.conf files in that directory?

    – Alexey Ten
    Dec 24 '14 at 6:08











  • yes, i have WebuzoVH.conf that came with the Control Panel Webuzo: Code: # DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO. server listen 80; server_name mydomain.com www.my domain.com; # The Document Root root /home/www-data/public_html; error_log /usr/local/apps/nginx/var/log/mydomain.com.err; access_log /usr/local/apps/nginx/var/log/mydomain.com.log main; include /usr/local/apps/nginx/etc/conf.d/common;

    – Tomer Cohen
    Dec 24 '14 at 10:51


















1















i got this Error :



"server" directive is not allowed here in /usr/local/apps/nginx/etc/conf.d/mydomain.com.conf:1 
nginx: configuration file /usr/local/apps/nginx/etc/nginx.conf test failed


i use with Webuzo control panel + Lemp Stack from there .
this what i did...
i configured nginx.conf to this settings:



 #user www-data;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

pid /usr/local/apps/nginx/var/log/nginx.pid;

events
worker_connections 1024;



http

# Let NGINX get the real client IP for its access logs
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;


# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
client_max_body_size 15m;
client_body_timeout 60;
client_header_timeout 60;
client_body_buffer_size 1K;
client_header_buffer_size 1k;
large_client_header_buffers 4 8k;
send_timeout 60;
reset_timedout_connection on;
types_hash_max_size 2048;
server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /usr/local/apps/nginx/etc/mime.types;
default_type application/octet-stream;

# Logging Settings
error_log /usr/local/apps/nginx/var/log/error_log debug;
access_log /usr/local/apps/nginx/var/log/web.access.log;

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

# Gzip Settings
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 512;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/css text/javascript text/xml text/plain text/x-component
application/javascript application/x-javascript application/json
application/xml application/rss+xml font/truetype application/x-font-ttf
font/opentype application/vnd.ms-fontobject image/svg+xml;

include /usr/local/apps/nginx/etc/conf.d/*.conf;



and after that i checked with nginx -t and it was ok...



I continued to the next file mydomain.com.conf and this what i putted there:



server 
listen 127.0.0.1:8080;
server_name mydomain.com;

port_in_redirect off;
server_tokens off;
autoindex off;

client_max_body_size 15m;
client_body_buffer_size 128k;

access_log /usr/local/apps/nginx/var/log/mydomain.com.log main;
error_log /usr/local/apps/nginx/var/log/mydomain.com.err;

root /home/www-data/public_html;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php;

error_page 404 /404.html;
location = /404.html
root /usr/local/apps/nginx/etc//html;


# Define default caching of 24h
expires 86400s;
add_header Pragma public;
add_header Cache-Control "max-age=86400, public, must-revalidate, proxy-revalidate";

# Redirect server error pages to static 50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html
root /usr/local/apps/nginx/etc//html;


# Don't log robots.txt requests
location = /robots.txt
allow all;
log_not_found off;
access_log off;


# Rewrite for versioned CSS+JS via filemtime
location ~* ^.+.(css

location ~* (^(?!(?:(?!(php|inc)).)*/uploads/).*?(php))
try_files $uri = 404;
fastcgi_split_path_info ^(.+.php)(.*)$;
fastcgi_pass unix:/var/run/php-fpm.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include /usr/local/apps/nginx/etc/fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;


}


and WebuzoVH.conf
code:






# DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO.

server
listen 80;
server_name mydomain.com www.my domain.com;
# The Document Root
root /home/www-data/public_html;
error_log /usr/local/apps/nginx/var/log/mydomain.com.err;
access_log /usr/local/apps/nginx/var/log/mydomain.com.log main;
include /usr/local/apps/nginx/etc/conf.d/common;





what wrong here , how can I fix that ?



i sit on that almost 5 hours :-(



thanks for all who can help me,
Tomer.










share|improve this question
























  • What does "(0 Replies, Read 16 times)" refer to in your title?

    – Kevin B
    Dec 23 '14 at 19:52











  • Did you use a http context and put server block inside that? like http ... server

    – dev0z
    Dec 23 '14 at 20:15











  • I FORGOT TO ADD THE content of Nginx.conf but now it's show... so if you can see again i appreciate that thanks..

    – Tomer Cohen
    Dec 24 '14 at 0:56












  • Do you have other *.conf files in that directory?

    – Alexey Ten
    Dec 24 '14 at 6:08











  • yes, i have WebuzoVH.conf that came with the Control Panel Webuzo: Code: # DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO. server listen 80; server_name mydomain.com www.my domain.com; # The Document Root root /home/www-data/public_html; error_log /usr/local/apps/nginx/var/log/mydomain.com.err; access_log /usr/local/apps/nginx/var/log/mydomain.com.log main; include /usr/local/apps/nginx/etc/conf.d/common;

    – Tomer Cohen
    Dec 24 '14 at 10:51














1












1








1


1






i got this Error :



"server" directive is not allowed here in /usr/local/apps/nginx/etc/conf.d/mydomain.com.conf:1 
nginx: configuration file /usr/local/apps/nginx/etc/nginx.conf test failed


i use with Webuzo control panel + Lemp Stack from there .
this what i did...
i configured nginx.conf to this settings:



 #user www-data;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

pid /usr/local/apps/nginx/var/log/nginx.pid;

events
worker_connections 1024;



http

# Let NGINX get the real client IP for its access logs
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;


# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
client_max_body_size 15m;
client_body_timeout 60;
client_header_timeout 60;
client_body_buffer_size 1K;
client_header_buffer_size 1k;
large_client_header_buffers 4 8k;
send_timeout 60;
reset_timedout_connection on;
types_hash_max_size 2048;
server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /usr/local/apps/nginx/etc/mime.types;
default_type application/octet-stream;

# Logging Settings
error_log /usr/local/apps/nginx/var/log/error_log debug;
access_log /usr/local/apps/nginx/var/log/web.access.log;

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

# Gzip Settings
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 512;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/css text/javascript text/xml text/plain text/x-component
application/javascript application/x-javascript application/json
application/xml application/rss+xml font/truetype application/x-font-ttf
font/opentype application/vnd.ms-fontobject image/svg+xml;

include /usr/local/apps/nginx/etc/conf.d/*.conf;



and after that i checked with nginx -t and it was ok...



I continued to the next file mydomain.com.conf and this what i putted there:



server 
listen 127.0.0.1:8080;
server_name mydomain.com;

port_in_redirect off;
server_tokens off;
autoindex off;

client_max_body_size 15m;
client_body_buffer_size 128k;

access_log /usr/local/apps/nginx/var/log/mydomain.com.log main;
error_log /usr/local/apps/nginx/var/log/mydomain.com.err;

root /home/www-data/public_html;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php;

error_page 404 /404.html;
location = /404.html
root /usr/local/apps/nginx/etc//html;


# Define default caching of 24h
expires 86400s;
add_header Pragma public;
add_header Cache-Control "max-age=86400, public, must-revalidate, proxy-revalidate";

# Redirect server error pages to static 50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html
root /usr/local/apps/nginx/etc//html;


# Don't log robots.txt requests
location = /robots.txt
allow all;
log_not_found off;
access_log off;


# Rewrite for versioned CSS+JS via filemtime
location ~* ^.+.(css

location ~* (^(?!(?:(?!(php|inc)).)*/uploads/).*?(php))
try_files $uri = 404;
fastcgi_split_path_info ^(.+.php)(.*)$;
fastcgi_pass unix:/var/run/php-fpm.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include /usr/local/apps/nginx/etc/fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;


}


and WebuzoVH.conf
code:






# DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO.

server
listen 80;
server_name mydomain.com www.my domain.com;
# The Document Root
root /home/www-data/public_html;
error_log /usr/local/apps/nginx/var/log/mydomain.com.err;
access_log /usr/local/apps/nginx/var/log/mydomain.com.log main;
include /usr/local/apps/nginx/etc/conf.d/common;





what wrong here , how can I fix that ?



i sit on that almost 5 hours :-(



thanks for all who can help me,
Tomer.










share|improve this question
















i got this Error :



"server" directive is not allowed here in /usr/local/apps/nginx/etc/conf.d/mydomain.com.conf:1 
nginx: configuration file /usr/local/apps/nginx/etc/nginx.conf test failed


i use with Webuzo control panel + Lemp Stack from there .
this what i did...
i configured nginx.conf to this settings:



 #user www-data;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

pid /usr/local/apps/nginx/var/log/nginx.pid;

events
worker_connections 1024;



http

# Let NGINX get the real client IP for its access logs
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;


# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
client_max_body_size 15m;
client_body_timeout 60;
client_header_timeout 60;
client_body_buffer_size 1K;
client_header_buffer_size 1k;
large_client_header_buffers 4 8k;
send_timeout 60;
reset_timedout_connection on;
types_hash_max_size 2048;
server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /usr/local/apps/nginx/etc/mime.types;
default_type application/octet-stream;

# Logging Settings
error_log /usr/local/apps/nginx/var/log/error_log debug;
access_log /usr/local/apps/nginx/var/log/web.access.log;

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

# Gzip Settings
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 512;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/css text/javascript text/xml text/plain text/x-component
application/javascript application/x-javascript application/json
application/xml application/rss+xml font/truetype application/x-font-ttf
font/opentype application/vnd.ms-fontobject image/svg+xml;

include /usr/local/apps/nginx/etc/conf.d/*.conf;



and after that i checked with nginx -t and it was ok...



I continued to the next file mydomain.com.conf and this what i putted there:



server 
listen 127.0.0.1:8080;
server_name mydomain.com;

port_in_redirect off;
server_tokens off;
autoindex off;

client_max_body_size 15m;
client_body_buffer_size 128k;

access_log /usr/local/apps/nginx/var/log/mydomain.com.log main;
error_log /usr/local/apps/nginx/var/log/mydomain.com.err;

root /home/www-data/public_html;
index index.php index.html index.htm;
try_files $uri $uri/ /index.php;

error_page 404 /404.html;
location = /404.html
root /usr/local/apps/nginx/etc//html;


# Define default caching of 24h
expires 86400s;
add_header Pragma public;
add_header Cache-Control "max-age=86400, public, must-revalidate, proxy-revalidate";

# Redirect server error pages to static 50x.html
error_page 500 502 503 504 /50x.html;
location = /50x.html
root /usr/local/apps/nginx/etc//html;


# Don't log robots.txt requests
location = /robots.txt
allow all;
log_not_found off;
access_log off;


# Rewrite for versioned CSS+JS via filemtime
location ~* ^.+.(css

location ~* (^(?!(?:(?!(php|inc)).)*/uploads/).*?(php))
try_files $uri = 404;
fastcgi_split_path_info ^(.+.php)(.*)$;
fastcgi_pass unix:/var/run/php-fpm.socket;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
include /usr/local/apps/nginx/etc/fastcgi_params;
fastcgi_intercept_errors on;
fastcgi_ignore_client_abort off;
fastcgi_connect_timeout 60;
fastcgi_send_timeout 180;
fastcgi_read_timeout 180;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 256k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k;


}


and WebuzoVH.conf
code:






# DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO.

server
listen 80;
server_name mydomain.com www.my domain.com;
# The Document Root
root /home/www-data/public_html;
error_log /usr/local/apps/nginx/var/log/mydomain.com.err;
access_log /usr/local/apps/nginx/var/log/mydomain.com.log main;
include /usr/local/apps/nginx/etc/conf.d/common;





what wrong here , how can I fix that ?



i sit on that almost 5 hours :-(



thanks for all who can help me,
Tomer.






# DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO.

server
listen 80;
server_name mydomain.com www.my domain.com;
# The Document Root
root /home/www-data/public_html;
error_log /usr/local/apps/nginx/var/log/mydomain.com.err;
access_log /usr/local/apps/nginx/var/log/mydomain.com.log main;
include /usr/local/apps/nginx/etc/conf.d/common;





# DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO.

server
listen 80;
server_name mydomain.com www.my domain.com;
# The Document Root
root /home/www-data/public_html;
error_log /usr/local/apps/nginx/var/log/mydomain.com.err;
access_log /usr/local/apps/nginx/var/log/mydomain.com.log main;
include /usr/local/apps/nginx/etc/conf.d/common;






nginx






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Dec 24 '14 at 10:56







Tomer Cohen

















asked Dec 23 '14 at 19:50









Tomer CohenTomer Cohen

1217




1217












  • What does "(0 Replies, Read 16 times)" refer to in your title?

    – Kevin B
    Dec 23 '14 at 19:52











  • Did you use a http context and put server block inside that? like http ... server

    – dev0z
    Dec 23 '14 at 20:15











  • I FORGOT TO ADD THE content of Nginx.conf but now it's show... so if you can see again i appreciate that thanks..

    – Tomer Cohen
    Dec 24 '14 at 0:56












  • Do you have other *.conf files in that directory?

    – Alexey Ten
    Dec 24 '14 at 6:08











  • yes, i have WebuzoVH.conf that came with the Control Panel Webuzo: Code: # DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO. server listen 80; server_name mydomain.com www.my domain.com; # The Document Root root /home/www-data/public_html; error_log /usr/local/apps/nginx/var/log/mydomain.com.err; access_log /usr/local/apps/nginx/var/log/mydomain.com.log main; include /usr/local/apps/nginx/etc/conf.d/common;

    – Tomer Cohen
    Dec 24 '14 at 10:51


















  • What does "(0 Replies, Read 16 times)" refer to in your title?

    – Kevin B
    Dec 23 '14 at 19:52











  • Did you use a http context and put server block inside that? like http ... server

    – dev0z
    Dec 23 '14 at 20:15











  • I FORGOT TO ADD THE content of Nginx.conf but now it's show... so if you can see again i appreciate that thanks..

    – Tomer Cohen
    Dec 24 '14 at 0:56












  • Do you have other *.conf files in that directory?

    – Alexey Ten
    Dec 24 '14 at 6:08











  • yes, i have WebuzoVH.conf that came with the Control Panel Webuzo: Code: # DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO. server listen 80; server_name mydomain.com www.my domain.com; # The Document Root root /home/www-data/public_html; error_log /usr/local/apps/nginx/var/log/mydomain.com.err; access_log /usr/local/apps/nginx/var/log/mydomain.com.log main; include /usr/local/apps/nginx/etc/conf.d/common;

    – Tomer Cohen
    Dec 24 '14 at 10:51

















What does "(0 Replies, Read 16 times)" refer to in your title?

– Kevin B
Dec 23 '14 at 19:52





What does "(0 Replies, Read 16 times)" refer to in your title?

– Kevin B
Dec 23 '14 at 19:52













Did you use a http context and put server block inside that? like http ... server

– dev0z
Dec 23 '14 at 20:15





Did you use a http context and put server block inside that? like http ... server

– dev0z
Dec 23 '14 at 20:15













I FORGOT TO ADD THE content of Nginx.conf but now it's show... so if you can see again i appreciate that thanks..

– Tomer Cohen
Dec 24 '14 at 0:56






I FORGOT TO ADD THE content of Nginx.conf but now it's show... so if you can see again i appreciate that thanks..

– Tomer Cohen
Dec 24 '14 at 0:56














Do you have other *.conf files in that directory?

– Alexey Ten
Dec 24 '14 at 6:08





Do you have other *.conf files in that directory?

– Alexey Ten
Dec 24 '14 at 6:08













yes, i have WebuzoVH.conf that came with the Control Panel Webuzo: Code: # DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO. server listen 80; server_name mydomain.com www.my domain.com; # The Document Root root /home/www-data/public_html; error_log /usr/local/apps/nginx/var/log/mydomain.com.err; access_log /usr/local/apps/nginx/var/log/mydomain.com.log main; include /usr/local/apps/nginx/etc/conf.d/common;

– Tomer Cohen
Dec 24 '14 at 10:51






yes, i have WebuzoVH.conf that came with the Control Panel Webuzo: Code: # DO NOT EDIT. AUTOMATICALLY GENERATED BY WEBUZO. server listen 80; server_name mydomain.com www.my domain.com; # The Document Root root /home/www-data/public_html; error_log /usr/local/apps/nginx/var/log/mydomain.com.err; access_log /usr/local/apps/nginx/var/log/mydomain.com.log main; include /usr/local/apps/nginx/etc/conf.d/common;

– Tomer Cohen
Dec 24 '14 at 10:51













1 Answer
1






active

oldest

votes


















0














i change to this setting and now Nginx give OK in Command
this what i changed..
maybe this can be help to other..



the nginx.conf file




#user www-data;
worker_processes 1;

#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;

pid /usr/local/apps/nginx/var/log/nginx.pid;

events
worker_connections 1024;
multi_accept on;
use epoll;



http

# Let NGINX get the real client IP for its access logs
set_real_ip_from 127.0.0.1;
real_ip_header X-Forwarded-For;

# Basic Settings
sendfile on;
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 20;
client_max_body_size 15m;
client_body_timeout 60;
client_header_timeout 60;
client_body_buffer_size 1K;
client_header_buffer_size 1k;
large_client_header_buffers 4 8k;
send_timeout 60;
reset_timedout_connection on;
types_hash_max_size 2048;
server_tokens off;

# server_names_hash_bucket_size 64;
# server_name_in_redirect off;

include /usr/local/apps/nginx/etc/mime.types;
default_type application/octet-stream;

# Logging Settings
#access_log /usr/local/apps/nginx/var/log/web.access.log;
error_log /usr/local/apps/nginx/var/log/error_log debug;

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

# Gzip Settings
gzip on;
gzip_static on;
gzip_disable "msie6";
gzip_vary on;
gzip_proxied any;
gzip_comp_level 6;
gzip_min_length 512;
gzip_buffers 16 8k;
gzip_http_version 1.1;
gzip_types text/css text/javascript text/xml text/plain text/x-component
application/javascript application/x-javascript application/json
application/xml application/rss+xml font/truetype application/x-font-ttf
font/opentype application/vnd.ms-fontobject image/svg+xml

include /usr/local/apps/nginx/etc/conf.d/*.conf;
include /usr/local/apps/nginx/etc/sites-enabled/*;





and this for Mydomain.com.conf file






server xls








share|improve this answer























    Your Answer






    StackExchange.ifUsing("editor", function ()
    StackExchange.using("externalEditor", function ()
    StackExchange.using("snippets", function ()
    StackExchange.snippets.init();
    );
    );
    , "code-snippets");

    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "1"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f27627073%2fserver-directive-is-not-allowed-here-in-usr-local-apps-nginx-etc-conf-d-wha%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    i change to this setting and now Nginx give OK in Command
    this what i changed..
    maybe this can be help to other..



    the nginx.conf file




    #user www-data;
    worker_processes 1;

    #error_log logs/error.log;
    #error_log logs/error.log notice;
    #error_log logs/error.log info;

    pid /usr/local/apps/nginx/var/log/nginx.pid;

    events
    worker_connections 1024;
    multi_accept on;
    use epoll;



    http

    # Let NGINX get the real client IP for its access logs
    set_real_ip_from 127.0.0.1;
    real_ip_header X-Forwarded-For;

    # Basic Settings
    sendfile on;
    tcp_nopush on;
    tcp_nodelay on;
    keepalive_timeout 20;
    client_max_body_size 15m;
    client_body_timeout 60;
    client_header_timeout 60;
    client_body_buffer_size 1K;
    client_header_buffer_size 1k;
    large_client_header_buffers 4 8k;
    send_timeout 60;
    reset_timedout_connection on;
    types_hash_max_size 2048;
    server_tokens off;

    # server_names_hash_bucket_size 64;
    # server_name_in_redirect off;

    include /usr/local/apps/nginx/etc/mime.types;
    default_type application/octet-stream;

    # Logging Settings
    #access_log /usr/local/apps/nginx/var/log/web.access.log;
    error_log /usr/local/apps/nginx/var/log/error_log debug;

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

    # Gzip Settings
    gzip on;
    gzip_static on;
    gzip_disable "msie6";
    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_min_length 512;
    gzip_buffers 16 8k;
    gzip_http_version 1.1;
    gzip_types text/css text/javascript text/xml text/plain text/x-component
    application/javascript application/x-javascript application/json
    application/xml application/rss+xml font/truetype application/x-font-ttf
    font/opentype application/vnd.ms-fontobject image/svg+xml

    include /usr/local/apps/nginx/etc/conf.d/*.conf;
    include /usr/local/apps/nginx/etc/sites-enabled/*;





    and this for Mydomain.com.conf file






    server xls








    share|improve this answer



























      0














      i change to this setting and now Nginx give OK in Command
      this what i changed..
      maybe this can be help to other..



      the nginx.conf file




      #user www-data;
      worker_processes 1;

      #error_log logs/error.log;
      #error_log logs/error.log notice;
      #error_log logs/error.log info;

      pid /usr/local/apps/nginx/var/log/nginx.pid;

      events
      worker_connections 1024;
      multi_accept on;
      use epoll;



      http

      # Let NGINX get the real client IP for its access logs
      set_real_ip_from 127.0.0.1;
      real_ip_header X-Forwarded-For;

      # Basic Settings
      sendfile on;
      tcp_nopush on;
      tcp_nodelay on;
      keepalive_timeout 20;
      client_max_body_size 15m;
      client_body_timeout 60;
      client_header_timeout 60;
      client_body_buffer_size 1K;
      client_header_buffer_size 1k;
      large_client_header_buffers 4 8k;
      send_timeout 60;
      reset_timedout_connection on;
      types_hash_max_size 2048;
      server_tokens off;

      # server_names_hash_bucket_size 64;
      # server_name_in_redirect off;

      include /usr/local/apps/nginx/etc/mime.types;
      default_type application/octet-stream;

      # Logging Settings
      #access_log /usr/local/apps/nginx/var/log/web.access.log;
      error_log /usr/local/apps/nginx/var/log/error_log debug;

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

      # Gzip Settings
      gzip on;
      gzip_static on;
      gzip_disable "msie6";
      gzip_vary on;
      gzip_proxied any;
      gzip_comp_level 6;
      gzip_min_length 512;
      gzip_buffers 16 8k;
      gzip_http_version 1.1;
      gzip_types text/css text/javascript text/xml text/plain text/x-component
      application/javascript application/x-javascript application/json
      application/xml application/rss+xml font/truetype application/x-font-ttf
      font/opentype application/vnd.ms-fontobject image/svg+xml

      include /usr/local/apps/nginx/etc/conf.d/*.conf;
      include /usr/local/apps/nginx/etc/sites-enabled/*;





      and this for Mydomain.com.conf file






      server xls








      share|improve this answer

























        0












        0








        0







        i change to this setting and now Nginx give OK in Command
        this what i changed..
        maybe this can be help to other..



        the nginx.conf file




        #user www-data;
        worker_processes 1;

        #error_log logs/error.log;
        #error_log logs/error.log notice;
        #error_log logs/error.log info;

        pid /usr/local/apps/nginx/var/log/nginx.pid;

        events
        worker_connections 1024;
        multi_accept on;
        use epoll;



        http

        # Let NGINX get the real client IP for its access logs
        set_real_ip_from 127.0.0.1;
        real_ip_header X-Forwarded-For;

        # Basic Settings
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 20;
        client_max_body_size 15m;
        client_body_timeout 60;
        client_header_timeout 60;
        client_body_buffer_size 1K;
        client_header_buffer_size 1k;
        large_client_header_buffers 4 8k;
        send_timeout 60;
        reset_timedout_connection on;
        types_hash_max_size 2048;
        server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /usr/local/apps/nginx/etc/mime.types;
        default_type application/octet-stream;

        # Logging Settings
        #access_log /usr/local/apps/nginx/var/log/web.access.log;
        error_log /usr/local/apps/nginx/var/log/error_log debug;

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

        # Gzip Settings
        gzip on;
        gzip_static on;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_proxied any;
        gzip_comp_level 6;
        gzip_min_length 512;
        gzip_buffers 16 8k;
        gzip_http_version 1.1;
        gzip_types text/css text/javascript text/xml text/plain text/x-component
        application/javascript application/x-javascript application/json
        application/xml application/rss+xml font/truetype application/x-font-ttf
        font/opentype application/vnd.ms-fontobject image/svg+xml

        include /usr/local/apps/nginx/etc/conf.d/*.conf;
        include /usr/local/apps/nginx/etc/sites-enabled/*;





        and this for Mydomain.com.conf file






        server xls








        share|improve this answer













        i change to this setting and now Nginx give OK in Command
        this what i changed..
        maybe this can be help to other..



        the nginx.conf file




        #user www-data;
        worker_processes 1;

        #error_log logs/error.log;
        #error_log logs/error.log notice;
        #error_log logs/error.log info;

        pid /usr/local/apps/nginx/var/log/nginx.pid;

        events
        worker_connections 1024;
        multi_accept on;
        use epoll;



        http

        # Let NGINX get the real client IP for its access logs
        set_real_ip_from 127.0.0.1;
        real_ip_header X-Forwarded-For;

        # Basic Settings
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 20;
        client_max_body_size 15m;
        client_body_timeout 60;
        client_header_timeout 60;
        client_body_buffer_size 1K;
        client_header_buffer_size 1k;
        large_client_header_buffers 4 8k;
        send_timeout 60;
        reset_timedout_connection on;
        types_hash_max_size 2048;
        server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /usr/local/apps/nginx/etc/mime.types;
        default_type application/octet-stream;

        # Logging Settings
        #access_log /usr/local/apps/nginx/var/log/web.access.log;
        error_log /usr/local/apps/nginx/var/log/error_log debug;

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

        # Gzip Settings
        gzip on;
        gzip_static on;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_proxied any;
        gzip_comp_level 6;
        gzip_min_length 512;
        gzip_buffers 16 8k;
        gzip_http_version 1.1;
        gzip_types text/css text/javascript text/xml text/plain text/x-component
        application/javascript application/x-javascript application/json
        application/xml application/rss+xml font/truetype application/x-font-ttf
        font/opentype application/vnd.ms-fontobject image/svg+xml

        include /usr/local/apps/nginx/etc/conf.d/*.conf;
        include /usr/local/apps/nginx/etc/sites-enabled/*;





        and this for Mydomain.com.conf file






        server xls








        #user www-data;
        worker_processes 1;

        #error_log logs/error.log;
        #error_log logs/error.log notice;
        #error_log logs/error.log info;

        pid /usr/local/apps/nginx/var/log/nginx.pid;

        events
        worker_connections 1024;
        multi_accept on;
        use epoll;



        http

        # Let NGINX get the real client IP for its access logs
        set_real_ip_from 127.0.0.1;
        real_ip_header X-Forwarded-For;

        # Basic Settings
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 20;
        client_max_body_size 15m;
        client_body_timeout 60;
        client_header_timeout 60;
        client_body_buffer_size 1K;
        client_header_buffer_size 1k;
        large_client_header_buffers 4 8k;
        send_timeout 60;
        reset_timedout_connection on;
        types_hash_max_size 2048;
        server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /usr/local/apps/nginx/etc/mime.types;
        default_type application/octet-stream;

        # Logging Settings
        #access_log /usr/local/apps/nginx/var/log/web.access.log;
        error_log /usr/local/apps/nginx/var/log/error_log debug;

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

        # Gzip Settings
        gzip on;
        gzip_static on;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_proxied any;
        gzip_comp_level 6;
        gzip_min_length 512;
        gzip_buffers 16 8k;
        gzip_http_version 1.1;
        gzip_types text/css text/javascript text/xml text/plain text/x-component
        application/javascript application/x-javascript application/json
        application/xml application/rss+xml font/truetype application/x-font-ttf
        font/opentype application/vnd.ms-fontobject image/svg+xml

        include /usr/local/apps/nginx/etc/conf.d/*.conf;
        include /usr/local/apps/nginx/etc/sites-enabled/*;





        #user www-data;
        worker_processes 1;

        #error_log logs/error.log;
        #error_log logs/error.log notice;
        #error_log logs/error.log info;

        pid /usr/local/apps/nginx/var/log/nginx.pid;

        events
        worker_connections 1024;
        multi_accept on;
        use epoll;



        http

        # Let NGINX get the real client IP for its access logs
        set_real_ip_from 127.0.0.1;
        real_ip_header X-Forwarded-For;

        # Basic Settings
        sendfile on;
        tcp_nopush on;
        tcp_nodelay on;
        keepalive_timeout 20;
        client_max_body_size 15m;
        client_body_timeout 60;
        client_header_timeout 60;
        client_body_buffer_size 1K;
        client_header_buffer_size 1k;
        large_client_header_buffers 4 8k;
        send_timeout 60;
        reset_timedout_connection on;
        types_hash_max_size 2048;
        server_tokens off;

        # server_names_hash_bucket_size 64;
        # server_name_in_redirect off;

        include /usr/local/apps/nginx/etc/mime.types;
        default_type application/octet-stream;

        # Logging Settings
        #access_log /usr/local/apps/nginx/var/log/web.access.log;
        error_log /usr/local/apps/nginx/var/log/error_log debug;

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

        # Gzip Settings
        gzip on;
        gzip_static on;
        gzip_disable "msie6";
        gzip_vary on;
        gzip_proxied any;
        gzip_comp_level 6;
        gzip_min_length 512;
        gzip_buffers 16 8k;
        gzip_http_version 1.1;
        gzip_types text/css text/javascript text/xml text/plain text/x-component
        application/javascript application/x-javascript application/json
        application/xml application/rss+xml font/truetype application/x-font-ttf
        font/opentype application/vnd.ms-fontobject image/svg+xml

        include /usr/local/apps/nginx/etc/conf.d/*.conf;
        include /usr/local/apps/nginx/etc/sites-enabled/*;





        server xls





        server xls






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 24 '14 at 17:30









        Tomer CohenTomer Cohen

        1217




        1217





























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Stack Overflow!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f27627073%2fserver-directive-is-not-allowed-here-in-usr-local-apps-nginx-etc-conf-d-wha%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Save data to MySQL database using ExtJS and PHP [closed]2019 Community Moderator ElectionHow can I prevent SQL injection in PHP?Which MySQL data type to use for storing boolean valuesPHP: Delete an element from an arrayHow do I connect to a MySQL Database in Python?Should I use the datetime or timestamp data type in MySQL?How to get a list of MySQL user accountsHow Do You Parse and Process HTML/XML in PHP?Reference — What does this symbol mean in PHP?How does PHP 'foreach' actually work?Why shouldn't I use mysql_* functions in PHP?

            Compiling GNU Global with universal-ctags support Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Data science time! April 2019 and salary with experience The Ask Question Wizard is Live!Tags for Emacs: Relationship between etags, ebrowse, cscope, GNU Global and exuberant ctagsVim and Ctags tips and trickscscope or ctags why choose one over the other?scons and ctagsctags cannot open option file “.ctags”Adding tag scopes in universal-ctagsShould I use Universal-ctags?Universal ctags on WindowsHow do I install GNU Global with universal ctags support using Homebrew?Universal ctags with emacsHow to highlight ctags generated by Universal Ctags in Vim?

            Add ONERROR event to image from jsp tldHow to add an image to a JPanel?Saving image from PHP URLHTML img scalingCheck if an image is loaded (no errors) with jQueryHow to force an <img> to take up width, even if the image is not loadedHow do I populate hidden form field with a value set in Spring ControllerStyling Raw elements Generated from JSP tagds with Jquery MobileLimit resizing of images with explicitly set width and height attributeserror TLD use in a jsp fileJsp tld files cannot be resolved