UPUPW Nginx怎么在局域网内直接输入IP访问EduSoho?
UPUPW Nginx怎么在局域网内直接输入IP访问EduSoho教程呢?今天格子啦小编就为您带来UPUPW Nginx实现局域网内直接输入IP访问EduSoho教程介绍。
1: 首先备份原来的配置文件vhosts.conf
就是把这个文件的名字修改成vhosts.conf.backup
2: 然后重新创建vhosts.conf文件
里面的内容替换成以下文字
server {
listen 80;
server_name 192.168.1.6 localhost alias 127.0.0.1; #最前面的IP改成当前机器IP
root D:/upupw/edusoho/web;
access_log D:/upupw/Nginx/logs/edusoho-rc.com.access.log;
error_log D:/upupw/Nginx/logs/edusoho-rc.com.error.log;
location / {
index app.php;
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
location ~ ^/udisk {
internal;
root D:/upupw/edusoho/app/data/;
}
location ~* .(jpg|jpeg|gif|png|ico|swf)$ {
expires 3y;
access_log off;
gzip off;
}
location ~* .(css|js)$ {
access_log off;
expires 3y;
}
location ~ ^/files/.*.(php|php5)$ {
deny all;
}
location ~ ^.+.php {
fastcgi_pass bakend;
fastcgi_index app.php;
fastcgi_split_path_info ^(.+.php)(/.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
fastcgi_param HTTPS off;
include fastcgi.conf;
include fastcgi_params;
}
location ~ ^/(app|app_dev).php(/|$) {
fastcgi_pass bakend;
fastcgi_split_path_info ^(.+.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
fastcgi_param HTTP_X-Sendfile-Type X-Accel-Redirect;
fastcgi_param HTTP_X-Accel-Mapping /udisk=/D:/upupw/edusoho/app/data/udisk;
fastcgi_buffer_size 128k;
fastcgi_buffers 8 128k;
}
}
#server localhost end}
3: 然后关闭Window操作系统的防火墙
4: 最后重新启动upupw。
先输入“s5”,再输入“s1”。
最后在浏览器中输入你自己的当前机器的IP地址就可以了。
以上就是UPUPW Nginx实现局域网内直接输入IP访问EduSoho教程介绍全部内容,按照以上的一步一步设置就可以实现局域网内直接访问EduSoho教程了。