2016-12-03 50 views
0

我已經安裝/主機erpnext應用程序使用Nginx配置。如何使用Apache安裝erpnext?

使用相同的配置,我試圖使用Apache服務器做到這一點,但它不工作。

以前有沒有人試過這個?

+0

請訪問以下鏈接:https://stackoverflow.com/questions/22959287/installation-not-proceed-in-erpnext –

+0

請訪問此鏈接:https://stackoverflow.com/questions/22959287/安裝 - 不進行功能於erpnext –

回答

0

這是我目前的工作配置(使用Let's encrpyt SSL的Apache 2.4)。

Socket.io是主要的問題,終於讓我找到了一種方法,使工作(transport=polling請求/socket.io必須http,所有其他請求/socket.io必須的WebSocket)。

<VirtualHost *:443> 
    ServerAdmin [email protected] 
    ServerName erpnext.example.com 

    DocumentRoot /home/frappe/frappe-bench/sites/erpnext.example.com/ 

    ProxyPreserveHost On 
    ProxyRequests Off 
    ProxyTimeout 120 
    ProxyPass "/.well-known/" "!" 
    ProxyPass "/AutoDiscover/" "!" 
    ProxyPass "/mail/" "!" 
    ProxyPass "/cgi-bin/" "!" 
    ProxyPass "/assets/" "!" 
    ProxyPass "/files/" "!" 

    RewriteEngine On 
    RewriteCond %{REQUEST_URI} ^/socket.io    [NC] 
    RewriteCond %{QUERY_STRING} transport=polling   [NC] 
    RewriteRule /(.*) http://localhost:9000/socket.io/$1 [P,L] 
    RequestHeader set Host "erpnext.example.com" 
    RequestHeader set X-Frappe-Site-Name "erpnext.example.com" 
    ProxyPass "/socket.io" "ws://localhost:9000/socket.io/" 
    ProxyPassReverse "/socket.io" "ws://localhost:9000/socket.io/" 
    <Location "/socket.io"> 
     RequestHeader set X-Frappe-Site-Name "erpnext.example.com" 
    </Location> 

    Alias "/assets" "/home/frappe/frappe-bench/sites/assets" 
    <Directory /home/frappe/frappe-bench/sites/assets> 
     Options FollowSymLinks 
     Require all granted 
    </Directory> 
    Alias "/files" "/home/frappe/frappe-bench/sites/erpnext.example.com/public/files" 
    <Directory /home/frappe/frappe-bench/sites/erpnext.example.com/public/files> 
     Options FollowSymLinks 
     Require all granted 
    </Directory> 
    ProxyPass "/" "http://localhost:8000/" 
    ProxyPassReverse "/" "http://localhost:8000/" 
    <Location "/"> 
     RequestHeader set X-Frappe-Site-Name "erpnext.example.com" 
    </Location> 

    SSLCertificateFile /etc/letsencrypt/live/erpnext.example.com/fullchain.pem 
    SSLCertificateKeyFile /etc/letsencrypt/live/erpnext.example.com/privkey.pem 
    Include /etc/letsencrypt/options-ssl-apache.conf 
</VirtualHost>