Страница 1 из 1

NGINX+ APACHE

Добавлено: 2009-08-03 17:02:04
100matolog
Делал по статье http://greenmice.info/ru/node/115
FreeBSD 6.2-RELEASE #0
/usr/local/apache2/bin/./apachectl -v
Server version: Apache/2.2.6 (Unix)
Server built: Dec 25 2007 12:56:59
nginx-0.7.61
Рассадил сервисы - nginx на внешний айпи - , апач на локалхост(127.0.0.1:80)

Код: Выделить всё

 server {                                                                                                                                                                       
        listen       80;                                                                                                                                                           
        server_name  10.100.101.204;                                                                                                                                               
                                                                                                                                                                                   
        #charset koi8-r;                                                                                                                                                           
                                                                                                                                                                                   
        #access_log  logs/host.access.log  main;                                                                                                                                   
                                                                                                                                                                                   
        #location / {                                                                                                                                                              
        #    root   html;                                                                                                                                                          
        #    index  index.html index.htm;                                                                                                                                          
        #}                                                                                                                                                                         
                                                                                                                                                                                   
        #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   html;                                                                                                                                                           
        }                                                                                                                                                                          
                                                                                                                                                                                   
        # proxy the PHP scripts to Apache listening on 127.0.0.1:80                                                                                                                
        #                                                                                                                                                                          
        location /{                                                                                                                                                                
            proxy_pass   http://127.0.0.1:80;                                                                                                                                      
        }                                        

Теперь когда стучусь на стервер по внешнему айпишнику
апач ругается

Код: Выделить всё

[Mon Aug 03 16:46:47 2009] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/www/operator2/htdocs/
[Mon Aug 03 16:46:47 2009] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/www/operator2/htdocs/
[Mon Aug 03 16:46:48 2009] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/www/operator2/htdocs/
[Mon Aug 03 16:46:48 2009] [error] [client 127.0.0.1] client denied by server configuration: /usr/local/www/operator2/htdocs/
в конфиге виртуал хоста на который лезет апач стоит allow from all....
Где могет быть косяк?

Re: NGINX+ APACHE

Добавлено: 2009-08-04 6:08:29
Burner
в конфиге апача

Re: NGINX+ APACHE

Добавлено: 2009-08-04 7:33:47
ViktorichZ
повесьте апач на порт, отличный от 80 а не на localhost. конфиг апача показывайте

Re: NGINX+ APACHE

Добавлено: 2009-08-04 8:53:58
hizel
и бсдю обновите :]

Re: NGINX+ APACHE

Добавлено: 2009-08-05 11:41:48
100matolog
hizel писал(а):и бсдю обновите :]
бсдю - порты обновил...а всю бсдю переставлять низя...есть причина

Re: NGINX+ APACHE

Добавлено: 2009-08-05 11:45:29
100matolog
конфиг апача
httpd.conf

Код: Выделить всё

ServerRoot "/usr/local/apache2"                                                                                                                                                    
                                                                                                                                                                                   
Listen *:80                                                                                                                                                                        
                                                                                                                                                                                   
User www                                                                                                                                                                           
Group www                                                                                                                                                                          
                                                                                                                                                                                   
Timeout 60                                                                                                                                                                         
KeepAlive On                                                                                                                                                                       
MaxKeepAliveRequests 100                                                                                                                                                           
KeepAliveTimeout 10                                                                                                                                                                
                                                                                                                                                                                   
<IfModule worker.c>                                                                                                                                                                
StartServers         4                                                                                                                                                             
ServerLimit          10                                                                                                                                                            
MaxClients           160                                                                                                                                                           
MinSpareThreads      32                                                                                                                                                            
MaxSpareThreads      64                                                                                                                                                            
ThreadsPerChild      16                                                                                                                                                            
MaxRequestsPerChild  0                                                                                                                                                             
</IfModule>                                                                                                                                                                        
                                                                                                                                                                                   
LoadModule authn_file_module modules/mod_authn_file.so                                                                                                                             
LoadModule authn_dbm_module modules/mod_authn_dbm.so                                                                                                                               
LoadModule authn_anon_module modules/mod_authn_anon.so                                                                                                                             
LoadModule authn_dbd_module modules/mod_authn_dbd.so                                                                                                                               
LoadModule authn_default_module modules/mod_authn_default.so                                                                                                                       
LoadModule authz_host_module modules/mod_authz_host.so                                                                                                                             
LoadModule authz_groupfile_module modules/mod_authz_groupfile.so                                                                                                                   
LoadModule authz_user_module modules/mod_authz_user.so                                                                                                                             
LoadModule authz_dbm_module modules/mod_authz_dbm.so                                                                                                                               
LoadModule authz_owner_module modules/mod_authz_owner.so                                                                                                                           
LoadModule authz_default_module modules/mod_authz_default.so                                                                                                                       
LoadModule auth_basic_module modules/mod_auth_basic.so                                                                                                                             
LoadModule auth_digest_module modules/mod_auth_digest.so                                                                                                                           
LoadModule dbd_module modules/mod_dbd.so                                                                                                                                           
LoadModule dumpio_module modules/mod_dumpio.so                                                                                                                                     
LoadModule ext_filter_module modules/mod_ext_filter.so                                                                                                                             
LoadModule include_module modules/mod_include.so                                                                                                                                   
LoadModule filter_module modules/mod_filter.so                                                                                                                                     
LoadModule deflate_module modules/mod_deflate.so                                                                                                                                   
LoadModule log_config_module modules/mod_log_config.so                                                                                                                             
LoadModule logio_module modules/mod_logio.so                                                                                                                                       
LoadModule env_module modules/mod_env.so                                                                                                                                           
LoadModule expires_module modules/mod_expires.so                                                                                                                                   
LoadModule headers_module modules/mod_headers.so                                                                                                                                   
LoadModule ident_module modules/mod_ident.so                                                                                                                                       
LoadModule setenvif_module modules/mod_setenvif.so                                                                                                                                 
LoadModule mime_module modules/mod_mime.so                                                                                                                                         
LoadModule dav_module modules/mod_dav.so                                                                                                                                           
LoadModule status_module modules/mod_status.so                                                                                                                                     
LoadModule autoindex_module modules/mod_autoindex.so                                                                                                                               
LoadModule asis_module modules/mod_asis.so                                                                                                                                         
LoadModule info_module modules/mod_info.so                                                                                                                                         
LoadModule suexec_module modules/mod_suexec.so                                                                                                                                     
LoadModule cgi_module modules/mod_cgi.so                                                                                                                                           
LoadModule dav_fs_module modules/mod_dav_fs.so                                                                                                                                     
LoadModule vhost_alias_module modules/mod_vhost_alias.so                                                                                                                           
LoadModule negotiation_module modules/mod_negotiation.so                                                                                                                           
LoadModule dir_module modules/mod_dir.so                                                                                                                                           
LoadModule imagemap_module modules/mod_imagemap.so
LoadModule actions_module modules/mod_actions.so                                                                                                                                   
LoadModule speling_module modules/mod_speling.so                                                                                                                                   
LoadModule userdir_module modules/mod_userdir.so                                                                                                                                   
LoadModule alias_module modules/mod_alias.so                                                                                                                                       
LoadModule rewrite_module modules/mod_rewrite.so                                                                                                                                   
LoadModule php5_module modules/libphp5.so                                                                                                                                          
LoadModule dav_svn_module     modules/mod_dav_svn.so                                                                                                                               
LoadModule authz_svn_module   modules/mod_authz_svn.so                                                                                                                             
                                                                                                                                                                                   
AddType application/x-httpd-php .php                                                                                                                                               
AddType application/x-httpd-php .phtml                                                                                                                                             
AddType application/x-httpd-sourse .phps                                                                                                                                           
                                                                                                                                                                                   
EnableSendfile Off                                                                                                                                                                 
                                                                                                                                                                                   
ServerAdmin support@mail.com                                                                                                                                                       
ServerName ut5.mail.com                                                                                                                                                           
                                                                                                                                                                                   
DocumentRoot "/usr/local/www"                                                                                                                                                      
UseCanonicalName Off                                                                                                                                                               
                                                                                                                                                                                   
<Location /server-status>                                                                                                                                                          
    SetHandler server-status                                                                                                                                                       
    Order Deny,Allow                                                                                                                                                               
    Deny from all                                                                                                                                                                  
    Allow from 127.0.0.1                                                                                                                                                           
</Location>                                                                                                                                                                        
                                                                                                                                                                                   
<Directory />                                                                                                                                                                      
    Options FollowSymLinks                                                                                                                                                         
    AllowOverride None                                                                                                                                                             
</Directory>                                                                                                                                                                       
                                                                                                                                                                                   
<Directory /usr/www/*/htdocs>                                                                                                                                                      
    AllowOverride FileInfo AuthConfig Limit Indexes                                                                                                                                
    Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec                                                                                                                 
    <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>                                                                                                                                                                       
                                                                                                                                                                                   
DirectoryIndex  index.php index.phtml                                                                                                                                              
AccessFileName .htaccess                                                                                                                                                           
                                                                                                                                                                                   
<Files ~ "^\.ht">                                                                                                                                                                  
    Order allow,deny                                                                                                                                                               
    Deny from all                                                                                                                                                                  
</Files>                                                                                                                                                                           
                                                                                                                                                                                   
TypesConfig conf/mime.types                                                                                                                                                        
DefaultType text/plain                                                                                                                                                             
                                                                                                                                                                                   
<IfModule mod_mime_magic.c>                                                                                                                                                        
    MIMEMagicFile conf/magic                                                                                                                                                       
</IfModule>                                                                                                                                                                        
HostnameLookups Off                                                                                                                                                                
ErrorLog /var/log/apache2/error_log                                                                                                                                                
                                                                                                                                                                                   
LogLevel info                                                                                                                                                                      
                                                                                                                                                                                   
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" " combined                                                                                                 
LogFormat "%h %l %u %t \"%r\" %>s %b " common                                                                                                                                      
LogFormat "%{Referer}i -> %U" referer                                                                                                                                              
LogFormat "%{User-agent}i" agent                                                                                                                                                   
                                                                                                                                                                                   
ServerTokens Minimal                                                                                                                                                               
ServerSignature Off                                                                                                                                                                
                                                                                                                                                                                   
Alias /icons/ "/usr/local/httpd/icons/"                                                                                                                                            
                                                                                                                                                                                   
<Directory "/usr/local/httpd/icons">                                                                                                                                               
    Options Indexes MultiViews                                                                                                                                                     
    AllowOverride None                                                                                                                                                             
    Order allow,deny                                                                                                                                                               
    Allow from all                                                                                                                                                                 
</Directory>                                                                                                                                                                       
                                                                                                                                                                                   
AddType application/x-tar .tgz                                                                                                                                                     
AddType application/x-compress .Z                                                                                                                                                  
AddType application/x-gzip .gz .tgz                                                                                                                                                
AddHandler cgi-script .cgi                                                                                                                                                         
AddHandler send-as-is asis                                                                                                                                                         
AddHandler type-map var                                                                                                                                                            
                                                                                                                                                                                   
BrowserMatch "Mozilla/2" nokeepalive                                                                                                                                               
BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0                                                                                                           
BrowserMatch "RealPlayer 4\.0" force-response-1.0                                                                                                                                  
BrowserMatch "Java/1\.0" force-response-1.0                                                                                                                                        
BrowserMatch "JDK/1\.0" force-response-1.0                                                                                                                                         
                                                                                                                                                                                   
BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully                                                                                               
BrowserMatch "^WebDrive" redirect-carefully                                                                                                                                        
BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully                                                                                                                                
BrowserMatch "^gnome-vfs" redirect-carefully                                                                                                                                       
                                                                                                                                                                                   
<Location /svn>                                                                                                                                                                    
    DAV svn                                                                                                                                                                        
    SVNParentPath /space0/svn/repo                                                                                                                                                 
    AuthType Basic                                                                                                                                                                 
    AuthName "Subversion repository"                                                                                                                                               
    AuthUserFile /space0/svn/svn.passwd                                                                                                                                            
    Require valid-user                                                                                                                                                             
</Location>                                                                                                                                                                        
                                                                                                                                                                                   
                                                                                                                                                                                   
NameVirtualHost *                                                                                                                                                                  
                                                                                                                                                                                   
Include conf/vhosts/*.conf 
+ конфиг виртуального хоста

Код: Выделить всё

<VirtualHost *>                                                                                                                                                                    
    ServerAdmin info@operator.int                                                                                                                                                  
    DocumentRoot /usr/local/www/operator_new/htdocs                                                                                                                                
    ServerName operator_new.int                                                                                                                                                    
                                                                                                                                                                                   
    <Directory "/usr/local/www/operator_new/htdocs">                                                                                                                               
        Options FollowSymLinks ExecCGI                                                                                                                                             
        AllowOverride None                                                                                                                                                         
Order allow,deny                                                                                                                                                                   
Allow from all                                                                                                                                                                     
                                                                                                                                                                                   
    </Directory>                                                                                                                                                                   
                                                                                                                                                                                   
    <Directory "/usr/local/www/operator2/cgi-bin">                                                                                                                                 
        Options FollowSymLinks                                                                                                                                                     
        AllowOverride None                                                                                                                                                         
        Order allow,deny                                                                                                                                                           
        Allow from all                                                                                                                                                             
    </Directory>                                                                                                                                                                   
                                                                                                                                                                                   
    ErrorLog /var/log/apache2/operator.error_log                                                                                                                                   
    #CustomLog logs/operator.access_log common                                                                                                                                     
                                                                                                                                                                                   
</VirtualHost>                                                                                                                                                                     
               

Re: NGINX+ APACHE

Добавлено: 2009-08-07 8:08:21
ViktorichZ
где тут про */operator2/* в конфигах апача ?