linuxuser88
Experte
- Mitglied seit
- 14.04.2014
- Beiträge
- 1.006
Vielleicht helfen dir diese Links weiter:.......
https://wiki.haskell.org/Xmonad/Using_xmonad_in_LXDE
Varun B Patil | Basic Xmonad setup in (L)ubuntu
Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: this_feature_currently_requires_accessing_site_using_safari
Vielleicht helfen dir diese Links weiter:.......
Kein Problem. Das Internet gibt meisten die passende Lösung. Man muss nur wissen, wie man suchen muss .
Ganz einfach.
Code:server { listen 80; listen [::]:80; server_name subdomain.domain.com; return 301 http://domain.com:4040$request_uri; }
server {
listen 80;
listen [::]:80 ipv6only=on;
root /var/www/example.org/public;
index index.php;
server_name example.org;
charset utf-8;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass php;
fastcgi_index index.php;
fastcgi_param APP_ENV production;
include fastcgi_params;
}
}
server {
listen 80 default_server;
listen [::]:80 default_server ipv6only=on;
# root /usr/share/nginx/html;
root /var/www/uugoma;
index index.html index.htm;
# Make site accessible from http://localhost/
server_name localhost;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ =404;
# Uncomment to enable naxsi on this location
# include /etc/nginx/naxsi.rules
}
# Only for nginx-naxsi used with nginx-naxsi-ui : process denied requests
#location /RequestDenied {
# proxy_pass http://127.0.0.1:8080;
#}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /usr/share/nginx/html;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# fastcgi_split_path_info ^(.+\.php)(/.+)$;
# # NOTE: You should have "cgi.fix_pathinfo = 0;" in php.ini
#
# # With php5-cgi alone:
# fastcgi_pass 127.0.0.1:9000;
# # With php5-fpm:
# fastcgi_pass unix:/var/run/php5-fpm.sock;
# fastcgi_index index.php;
# include fastcgi_params;
#}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
server {
listen 80;
listen [::]:80;
server_name megeza.uugoma.com;
return 301 http://uugoma.com:4040$request_uri;
}
user www-data;
worker_processes 4;
pid /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 /usr;
#passenger_ruby /usr/bin/ruby;
##
# 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;
# }
#}
user www-data;
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
##
# PHP upstream
##
upstream php {
server unix:/var/run/php5-fpm.sock;
}
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 15;
send_timeout 10;
types_hash_max_size 2048;
server_tokens off;
server_names_hash_bucket_size 64;
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;
##
# Buffers
##
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 8m;
large_client_header_buffers 2 1k;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_proxied expired no-cache no-store private auth;
gzip_comp_level 2;
gzip_min_length 1000;
gzip_types application/x-javascript text/css text/xml application/xml;
##
# Virtual Host Configs
##
# Dieser vHost leitet alle Domains, die nicht explizit in einem vHost deklariert sind, auf eine 404 um.
server {
listen 80;
return 404;
}
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
Schau mal über deinem Post, habe meinen nochmals erweitert. Deine nginx.conf könntest du auch noch so abändern. Die ist zwar auch nicht perfekt, aber besser als das Standardgesülze:
Code:user www-data; worker_processes 1; pid /run/nginx.pid; events { worker_connections 1024; } http { ## # PHP upstream ## upstream php { server unix:/var/run/php5-fpm.sock; } ## # Basic Settings ## sendfile on; tcp_nopush on; tcp_nodelay on; client_body_timeout 12; client_header_timeout 12; keepalive_timeout 15; send_timeout 10; types_hash_max_size 2048; server_tokens off; server_names_hash_bucket_size 64; 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; ## # Buffers ## client_body_buffer_size 10K; client_header_buffer_size 1k; client_max_body_size 8m; large_client_header_buffers 2 1k; ## # Gzip Settings ## gzip on; gzip_disable "msie6"; gzip_proxied expired no-cache no-store private auth; gzip_comp_level 2; gzip_min_length 1000; gzip_types application/x-javascript text/css text/xml application/xml; ## # Virtual Host Configs ## # Dieser vHost leitet alle Domains, die nicht explizit in einem vHost deklariert sind, auf eine 404 um. server { listen 80; return 404; } include /etc/nginx/conf.d/*.conf; include /etc/nginx/sites-enabled/*; }
Die Anleitung sieht ganz komisch aus. Allein schon wenn ich den Serverblock sehe wird mir flau im Magen. In der Anleitung da wird n vHost für ne Webseite ganz ohne PHP erstellt.
Genau so musst du es natürlich nicht machen. Aber das wäre sauberer als die Lösung, die du da scheinbar hast.
user www-data;
worker_processes 1;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
##
# PHP upstream
##
upstream php {
server unix:/var/run/php5-fpm.sock;
}
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
tcp_nodelay on;
client_body_timeout 12;
client_header_timeout 12;
keepalive_timeout 15;
send_timeout 10;
types_hash_max_size 2048;
server_tokens off;
server_names_hash_bucket_size 64;
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;
##
# Buffers
##
client_body_buffer_size 10K;
client_header_buffer_size 1k;
client_max_body_size 8m;
large_client_header_buffers 2 1k;
##
# Gzip Settings
##
gzip on;
gzip_disable "msie6";
gzip_proxied expired no-cache no-store private auth;
gzip_comp_level 2;
gzip_min_length 1000;
gzip_types application/x-javascript text/css text/xml application/xml;
##
# Virtual Host Configs
##
# Dieser vHost leitet alle Domains, die nicht explizit in einem vHost deklariert sind, auf eine 404 um.
server {
listen 80;
return 404;
}
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
server {
listen 80;
listen [::]:80 ipv6only=on;
root /var/www/uugoma;
index index.php;
server_name uugoma.com www.uugoma.com;
charset utf-8;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass php;
fastcgi_index index.php;
fastcgi_param APP_ENV production;
include fastcgi_params;
}
}
uugoma.com -> /etc/nginx/sites-available/uugoma.com.conf
Führe mal bitte "(sudo) nginx -t" aus und poste mal bitte die Ausgabe.
root@h...1:/etc/nginx/sites-enabled# sudo nginx -t
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Seite nicht erreichbar bedeutet? Was kommt?
PHP5-FPM ist auf dem Server installiert?
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
Chain FORWARD (policy ACCEPT)
target prot opt source destination
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
Dann schau dir mal den Nginx Error Log unter /var/log/nginx/error.log an, da steht mit Sicherheit was drin.
/var/log/nginx/error.log
2015/02/17 14:52:51 [error] 2137#0: *182 open() "/var/www/uugoma/images/pic00.jpg" failed (13: Permission
denied), client: 95.91.234.32, server: localhost, request: "GET /images/pic00.jpg HTTP/1.1", host: "uugom
.com", referrer: "http://uugoma.com/"
2015/02/17 22:32:56 [emerg] 10419#0: "proxy_pass" directive is not allowed here in /etc/nginx/sites-enabl
d/default:78
2015/02/17 22:34:11 [emerg] 2109#0: bind() to 0.0.0.0:4040 failed (98: Address already in use)
2015/02/17 22:34:11 [emerg] 2109#0: bind() to 0.0.0.0:4040 failed (98: Address already in use)
2015/02/17 22:34:11 [emerg] 2109#0: bind() to 0.0.0.0:4040 failed (98: Address already in use)
2015/02/17 22:34:11 [emerg] 2109#0: bind() to 0.0.0.0:4040 failed (98: Address already in use)
2015/02/17 22:34:11 [emerg] 2109#0: bind() to 0.0.0.0:4040 failed (98: Address already in use)
2015/02/17 22:34:11 [emerg] 2109#0: still could not bind()
2015/02/17 22:35:25 [emerg] 10447#0: "proxy_pass" directive is not allowed here in /etc/nginx/sites-enabl
d/default:79
pgrep -fl nginx
netstat -anp | grep :80.*LISTEN