修改后台访问端口:
需要修改openwrt的配置文件,文件路径 /etc/config/uhttpd
uhttpd文件内容如下
config uhttpd 'main' list listen_http '0.0.0.0:80' list listen_http '[::]:80' list listen_https '0.0.0.0:443' list listen_https '[::]:443' option redirect_https '0' option home '/www' option rfc1918_filter '1' option max_connections '100' option cert '/etc/uhttpd.crt' option key '/etc/uhttpd.key' option cgi_prefix '/cgi-bin' list lua_prefix '/cgi-bin/luci=/usr/lib/lua/luci/sgi/uhttpd.lua' option network_timeout '30' option http_keepalive '20' option tcp_keepalive '1' option ubus_prefix '/ubus' list index_page 'cgi-bin/luci' option max_requests '50' option script_timeout '3600' config cert 'defaults' option days '730' option key_type 'ec' option bits '2048' option ec_curve 'P-256' option country 'ZZ' option state 'Somewhere' option location 'Unknown' option commonname 'OpenWrt'
使用 vi uhttpd 编辑配置文件,端口自己按需修改,改完访问的话记得加上端口号
list listen_http '0.0.0.0:80' #ipv4http端口80 list listen_http '[::]:80' #ipv6http端口80 list listen_https '0.0.0.0:443' #ipv4https端口443 list listen_https '[::]:443' #ipv6https端口443
开启https访问
首先上传域名证书,比如上传上/etc/config/
目录
vi uhttpd 编辑此处证书指向路径
option cert '/etc/config/uhttpd.crt' option key '/etc/config/uhttpd.key'
最后,重启uhttpd服务
/etc/init.d/uhttpd restart
标签:option,端口,list,uhttpd,https,0.0,openwrt,listen From: https://www.cnblogs.com/xiykj/p/17689405.html