运行以下脚本,出现
./3121.sh: line 3: server
第三行是cat >/usr/local/nginx/conf/porxy/$domain.conf<<eof 怎么会错误了呢。
我可能钻牛角尖了,望指点了。
#!/bin/bash
cat >/usr/local/nginx/conf/porxy/$domain.conf<<eof
server
{
listen 80;
server_name $moredomain;
$access.log
location / {
proxy_pass http://$domain:80/;
}
location ~ .*\.(html|htm)$ {
expires -1s;
root $vhostdir;
proxy_store on;
proxy_store_access user:rw group:rw all:rw;
proxy_temp_path $vhostdir;
include /usr/local/nginx/conf/proxy.conf;
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)${
expires 12h;}
location ~ .*\.(js|css)?$ {
expires 2h; }
if ( !-e $request_filename) {
proxy_pass http://$domain:80;
}
}
}
eof