2013-05-06 79 views
1

我無法使Mono與nginx一起工作。我安裝了OpenBSD 5.3並設置了適當的(包)端口。我構建了mono,mono-xsp和nginx - 全部沒有發生。所有三個似乎工作正常,但不結合。502(Bad Gateway) - Nginx + Mono(OpenBSD 5.3)

我想運行默認的VS MVC3模板的Web應用程序,但不斷收到502(壞的網關)。在錯誤日誌中,我看到以下內容:

[crit] 31764#0: *1 connect() to unix:/tmp/fastcgi.socket failed (2: No such file or directory) while connecting to upstream,* 

令人沮喪的是/tmp/fastcgi.socket確實存在。我嘗試了'touch'並確保'wheel'和'www'具有適當的權限(chmod 775和777)。 'ls -la /tmp/fastcgi.socket'的結果顯示沒有任何錯誤。

這裏是我的配置:

worker_processes 1; 

events { 
    worker_connections 1024; 
} 

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

    server { 
     listen 80; 
     access_log /home/www/nginx.log; 
     error_log /home/www/errors.log; 

     # root /home/www/test; 
     # index index.html index.htm index.aspx default.aspx; 

     location ^~ /Scripts/ { } 
     location ^~ /Content/ { } 

     location/{ 
      root /home/www/test; 
      # fastcgi_index /; 

      fastcgi_pass unix:/tmp/fastcgi.socket; 

      # include  fastcgi_params; 
      include /etc/nginx/fastcgi_params; 
     } 
    } 
} 

回答

1

我要大膽地猜測OpenBSD的端口運行nginx的監禁或chroot的。所以首先檢查一下,如果是的話,你需要改變在jailed根目錄下創建的套接字路徑。

+0

謝謝梅爾文 - 你當場。我現在可以提供一個簡單的aspx文件(OpenBSD的nginx port chroot(8)到/ var/www/,所以套接字應該存在於某處)。下一站--MVC :-) – gplumb 2013-05-15 14:11:34

相關問題