1
abcdディレクトリ(url:example.com/abcd)に自分のファイル(Codeigniter Framework)をアップロードしました。内部のすべてのリンクは404エラーを返します。 index.phpのを除去するために、私は私のルートディレクトリにこのnginx.confファイルを配置している(サーバー上:/.../abcd/):nginx - すべてのURLのcodeigniter 404エラー
server {
server_name example.com/abcd;
root /..../abcd;
index index.html index.php index.htm;
# set expiration of assets to MAX for caching
location ~* \.(ico|css|js|gif|jpe?g|png)(\?[0-9]+)?$ {
expires max;
log_not_found off;
}
location/{
# Check if a file exists, or route it to index.php.
try_files $uri $uri/ /index.php;
}
location ~* \.php$ {
fastcgi_pass example.com/abcd;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
}
でここ はnginx.confファイルのコードです私は今nginxで立ち往生しています。 、私は初めてのnginxを使用しています
から取られたコードの下に試してみてください助けてください。 'server_name'は無効で、おそらく' fastcgi_pass'ステートメント –
@RichardSmith server_nameの正しい書式は? –
[このドキュメント](http://nginx.org/en/docs/http/server_names.html)をお読みください。しかし、あなたは 'サーバ名'と '場所'が一緒にマッシュされているようです。 –