1
我試圖在CENTOS 7數字海洋服務器上建立2個網站。在nginx上安裝兩個drupal
一個網站將由/srv/http/eventadvisor.in/public_html
提供,另一個來自/srv/http/eventadvisor.in/public_html
。
我在第一個目錄中成功安裝了drupal。現在,當我重複在第二個步驟,它會自動從第一個站點的settings.php文件中的設置,並提供了以下錯誤:
Drupal Already Installed
To start over, you must empty your existing database.
To install to a different database, edit the appropriate settings.php file in the sites folder.
To upgrade an existing installation, proceed to the update script.
View your existing site.
我運行具有以下的conf文件nginx的服務器:
user nginx;
worker_processes 1;
error_log /var/log/nginx/error.log warn;
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 65;
#gzip on;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*.conf;
}
而且每個站點的配置文件是:
server {
listen 80;
server_name sanjayshitole.com www.sanjayshitole.com *.sanjayshitole.com;
#charset koi8-r;
#access_log /var/log/nginx/log/host.access.log main;
# location/{
root /srv/http/sanjayshitole.com/public_html;
index index.php 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 /usr/share/nginx/html;
}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
root /srv/http/eventadvisor.in/public_html;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}