<![CDATA[Latest posts for the topic "Vấn đề configure Nginx"]]> /hvaonline/posts/list/24.html JForum - http://www.jforum.net Vấn đề configure Nginx httpd.conf
ServerRoot "/etc/httpd" Listen 127.0.0.1:8080 LoadModule php5_module /usr/lib/apache/libphp5.so Include /etc/httpd/conf/extra/httpd-phpmodules.conf User apache Group apache ServerAdmin admin@localhost DocumentRoot "/var/www/html" <Directory /home/*> AllowOverride All Options -MultiViews -Indexes FollowSymlinks IncludesNoExec +Includes <Limit GET POST OPTIONS PROPFIND> Order allow,deny Allow from all </Limit> <LimitExcept GET POST OPTIONS PROPFIND> Order deny,allow Deny from all </LimitExcept> </Directory> <Directory /> Options All AllowOverride All </Directory> <Directory "/var/www/html"> Options -Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all <IfModule mod_suphp.c> suPHP_Engine On suPHP_UserGroup webapps webapps SetEnv PHP_INI_SCAN_DIR </IfModule> </Directory> <IfModule dir_module> DirectoryIndex index.html index.htm index.shtml index.php index.php5 index.php4 index.php3 index.phtml index.cgi </IfModule> <FilesMatch "^\.ht"> Order allow,deny Deny from all Satisfy All </FilesMatch> ErrorLog /var/log/httpd/error_log LogLevel warn <IfModule log_config_module> #replace %b with %O for more accurate logging <IfModule mod_logio.c> LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined LogFormat "%h %l %u %t \"%r\" %>s %O" common LogFormat "%O" bytes LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %I %O" combinedio </IfModule> CustomLog /var/log/httpd/access_log common </IfModule> <IfModule alias_module> # Include some DirectAdmin alias Include conf/extra/httpd-alias.conf </IfModule> <Directory "/var/www/cgi-bin"> AllowOverride None Options None Order allow,deny Allow from all </Directory> DefaultType text/plain <IfModule mime_module> TypesConfig conf/mime.types AddType application/x-gzip .tgz AddEncoding x-compress .Z AddEncoding x-gzip .gz .tgz AddType application/x-compress .Z AddType application/x-gzip .gz .tgz AddHandler cgi-script .cgi AddHandler type-map var AddType text/html .shtml AddOutputFilter INCLUDES .shtml AddType video/x-ms-asf .avi AddType video/mpeg .mpg AddType video/mpeg .mpeg AddType video/quicktime .mov AddType video/x-ms-wmv .wmv </IfModule> #EnableMMAP off #EnableSendfile off ####################################################################################### # Do not change anything in included files, because they are rewritten by DirectAdmin # ####################################################################################### # This is needed for PHP Include conf/extra/httpd-php-handlers.conf # Server-pool management (MPM specific) Include conf/extra/httpd-mpm.conf # Multi-language error messages Include conf/extra/httpd-multilang-errordoc.conf # Fancy directory listings Include conf/extra/httpd-autoindex.conf # Language settings Include conf/extra/httpd-languages.conf # User home directories #Include conf/extra/httpd-userdir.conf # Real-time info on requests and configuration Include conf/extra/httpd-info.conf # Virtual hosts Include conf/extra/httpd-vhosts.conf # Local access to the Apache HTTP Server Manual #Include conf/extra/httpd-manual.conf # Distributed authoring and versioning (WebDAV) Include conf/extra/httpd-dav.conf # Various default settings Include conf/extra/httpd-default.conf # Secure (SSL/TLS) connections Include conf/extra/httpd-ssl.conf # Deflate module settings Include conf/extra/httpd-deflate.conf # All the DirectAdmin vhosts Include conf/extra/directadmin-vhosts.conf # All suPHP directives Include conf/extra/httpd-suphp.conf # For user configurations not maintained by DirectAdmin. Empty by default. Include conf/extra/httpd-includes.conf ####################################################################################### # End of included files that are rewritten by DirectAdmin # ####################################################################################### <IfModule ssl_module> SSLRandomSeed startup builtin SSLRandomSeed connect builtin </IfModule>  
File httpd-vhosts.conf
Include /etc/httpd/conf/ips.conf <VirtualHost *.8080> ServerAdmin webmaster@localhost AliasMatch ^/~([^/]+)(/.*)* /home/$1/public_html$2 DocumentRoot /var/www/html ServerName localhost ScriptAlias /cgi-bin/ /var/www/cgi-bin/ CustomLog /var/log/httpd/homedir.log homedir </VirtualHost>  
File directadmin-vhosts.conf
ServerRoot /etc/httpd <VirtualHost *:8080> ServerName www.mydomain.com ServerAlias www.mydomain.com mydomain.com ServerAdmin webmaster@mydomain.com DocumentRoot /home/mydomain/domains/public_html ScriptAlias /cgi-bin/ /home/mydomain/domains/public_html/cgi-bin/ UseCanonicalName OFF SuexecUserGroup site site ErrorLog /var/log/httpd/domains/error.log <Directory /home/mydomain/domains/public_html> Options +Includes -Indexes php_admin_flag engine ON <IfModule !mod_php6.c> php_admin_flag safe_mode OFF </IfModule> php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f iosha789@mydomain.com' php_admin_value open_basedir /home/mydomain/domains/:/tmp:/var/tmp:/usr/local/lib/php/ </Directory> </VirtualHost>  
File nginx.conf
user nginx nginx; worker_processes 2; error_log /var/log/nginx/error.log; 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; include /etc/nginx/conf.d/*.conf; server { listen 80; server_name _; location / { proxy_pass http://127.0.0.1:8080; include /etc/nginx/proxy.conf; } } include /etc/nginx/sites/*.conf; }  
File /etc/nginx/sites/vhost.conf
server { listen 80; server_name www.mydomain.com mydomain.com; location / { proxy_pass http://127.0.0.1:8080; include /etc/nginx/proxy.conf; } location ~* ^.+.(jpeg|jpg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|pdf|ppt|txt|tar|mid|midi|wav|bmp|rtf|js|swf|avi|mp3)$ { expires 30d; root /home/mydomain/domains/public_html/; } }  
PS: Lỗi em nói ở trên là trang web không load được, không biết trong các file cấu hình ở trên em có làm sai gì không ? Mọi người xem giúp em. Cảm ơn rất nhiều.]]>
/hvaonline/posts/list/38137.html#234191 /hvaonline/posts/list/38137.html#234191 GMT
Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234203 /hvaonline/posts/list/38137.html#234203 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234205 /hvaonline/posts/list/38137.html#234205 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234209 /hvaonline/posts/list/38137.html#234209 GMT Vấn đề configure Nginx Default Directadin (DA) dùng 4 script (nằm trong /usr/local/directadmin/data/templates/)sau để tạo httpd.conf cho từng user: - virtual_host2.conf - virtual_host2_secure.conf - virtual_host2_secure_sub.conf - virtual_host2_sub.conf  Vậy mình phải làm sao để fix lỗi này...mình vẫn chưa biết nguyên nhân lỗi do đâu. ]]> /hvaonline/posts/list/38137.html#234213 /hvaonline/posts/list/38137.html#234213 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234214 /hvaonline/posts/list/38137.html#234214 GMT Vấn đề configure Nginx httpd.conf của user uocmo
ServerRoot /etc/httpd <VirtualHost 112.78.15.104:80> // Mình edit lại thế thành <VirtualHost *:8080> ServerName www.uocmo.vn ServerAlias www.uocmo.vn uocmo.vn ServerAdmin webmaster@uocmo.vn DocumentRoot /home/uocmo/domains/uocmo.vn/public_html ScriptAlias /cgi-bin/ /home/uocmo/domains/uocmo.vn/public_html/cgi-bin/ UseCanonicalName OFF SuexecUserGroup uocmo uocmo CustomLog /var/log/httpd/domains/uocmo.vn.bytes bytes CustomLog /var/log/httpd/domains/uocmo.vn.log combined ErrorLog /var/log/httpd/domains/uocmo.vn.error.log <Directory /home/uocmo/domains/uocmo.vn/public_html> Options +Includes -Indexes php_admin_flag engine ON <IfModule !mod_php6.c> php_admin_flag safe_mode OFF </IfModule> php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f uocmo@uocmo.vn' php_admin_value open_basedir /home/uocmo/:/tmp:/var/tmp:/usr/local/lib/php/ </Directory> </VirtualHost> <VirtualHost 112.78.15.104:443> SSLEngine on SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key ServerName www.uocmo.vn ServerAlias www.uocmo.vn uocmo.vn ServerAdmin webmaster@uocmo.vn DocumentRoot /home/uocmo/domains/uocmo.vn/private_html ScriptAlias /cgi-bin/ /home/uocmo/domains/uocmo.vn/public_html/cgi-bin/ UseCanonicalName OFF SuexecUserGroup uocmo uocmo CustomLog /var/log/httpd/domains/uocmo.vn.bytes bytes CustomLog /var/log/httpd/domains/uocmo.vn.log combined ErrorLog /var/log/httpd/domains/uocmo.vn.error.log <Directory /home/uocmo/domains/uocmo.vn/private_html> Options +Includes -Indexes php_admin_flag engine ON <IfModule !mod_php6.c> php_admin_flag safe_mode OFF </IfModule> php_admin_value sendmail_path '/usr/sbin/sendmail -t -i -f uocmo@uocmo.vn' php_admin_value open_basedir /home/uocmo/:/tmp:/var/tmp:/usr/local/lib/php/ </Directory> </VirtualHost>  
]]>
/hvaonline/posts/list/38137.html#234216 /hvaonline/posts/list/38137.html#234216 GMT
Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234217 /hvaonline/posts/list/38137.html#234217 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234220 /hvaonline/posts/list/38137.html#234220 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234221 /hvaonline/posts/list/38137.html#234221 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234223 /hvaonline/posts/list/38137.html#234223 GMT Vấn đề configure Nginx http://stderr.net/apache/rpaf/ - Sửa /etc/httpd/conf/ips.conf <Your IP:80> thành 127.0.0.1:8080 - Sửa /etc/httpd/conf/extra/httpd-vhost.conf <Your IP:80> thành 127.0.0.1:8080 * NGINX PROXY: - Listen 112.78.15.104:80 (Áp dụng cho cả các user) * DIRECTADMIN: - Tạo file /etc/httpd/conf/ips_da.conf với nội dung như sau: LogFormat "%O \"%r\"" homedir NameVirtualHost <Your IP>:80 NameVirtualHost <Your IP>:443 - Sửa /usr/local/directadmin/conf/directadmin.conf thay apacheips=/etc/httpd/conf/ips.conf thành apacheips=/etc/httpd/conf/ips_da.conf - Sửa 2 file virtual_host2.conf,virtual_host2_sub.conf thay <VirtualHost Your IP:80 |MULTI_IP|> thành <VirtualHost 127.0.0.1:8080 |MULTI_IP|> - Dùng lệnh sau để rewrite httpd.conf của các user: echo "action=rewrite&value=httpd" >> /usr/local/directadmin/data/task.queue[/code][code][/code]]]> /hvaonline/posts/list/38137.html#234228 /hvaonline/posts/list/38137.html#234228 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234229 /hvaonline/posts/list/38137.html#234229 GMT Vấn đề configure Nginx [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:80 overlaps with VirtualHos t 112.78.15.104:80, the first has precedence, perhaps you need a NameVirtualHost direct ive [Tue Mar 29 18:50:29 2011] [warn] VirtualHost 112.78.15.104:443 overlaps with VirtualHo st 112.78.15.104:443, the first has precedence, perhaps you need a NameVirtualHost dire ctive   ]]> /hvaonline/posts/list/38137.html#234231 /hvaonline/posts/list/38137.html#234231 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234257 /hvaonline/posts/list/38137.html#234257 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234263 /hvaonline/posts/list/38137.html#234263 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234311 /hvaonline/posts/list/38137.html#234311 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234340 /hvaonline/posts/list/38137.html#234340 GMT Vấn đề configure Nginx /hvaonline/posts/list/38137.html#234518 /hvaonline/posts/list/38137.html#234518 GMT Vấn đề configure Nginx http://www.bxtra.net/articles/2011-02-13/how-to-use-nginx-as-a-reverse-proxy-for-directadmin]]> /hvaonline/posts/list/38137.html#234622 /hvaonline/posts/list/38137.html#234622 GMT