apache2的默认html修改

使用127.0.0.1的时候,默认打开的是index.html,可以通过配置文件修改成我们想要的html

vi /etc/apache2/mods-enabled/dir.conf

cs 复制代码
<IfModule mod_dir.c>
        DirectoryIndex WS.html index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet

如上是修改为了WS.html

开机自启动火狐浏览器,打开127.0.0.1,延迟启动(等待设备启动,10s),步骤如下(建议使用desktop文件)

sudo vi /etc/xdg/autostart/firefox-localhost.desktop

cs 复制代码
[Desktop Entry]
Type=Application
Name=Firefox Localhost
Exec=bash -c "sleep 10 && firefox --new-window 127.0.0.1"
StartupNotify=false
X-GNOME-Autostart-enabled=true

或者 sudo vi /etc/rc.local,在exit 0之前添加

cs 复制代码
sleep 30
su - [你的用户名] -c "export DISPLAY=:0 && firefox --new-window 127.0.0.1" &
相关推荐
StarsGreen8 小时前
Linux动态 DMA 映射指南(翻译版)
linux
StarsGreen13 小时前
Linux 网络配置命令参考
linux
飞奔的瓜牛1 天前
Nginx 生产环境运维实践:常见问题、关注要点与日常维护
运维·nginx
Eyfcom1 天前
〖物流 SaaS 实战 02〗SaaS 租户的计费与订阅模型:从“一锤子买卖”到“按需订阅”
linux·服务器·数据库·快递系统·物流saas实战
瑞克-桑切斯1 天前
Kubernetes 1.28 保姆级新手学习教程
运维·学习·docker·云原生·容器·kubernetes
数据库急诊室_阿哲1 天前
一次割接后的性能复核记录:基线、样本、回滚点
运维·数据库·dba
忆挽篱笙歌1 天前
systemV进程通信
linux·运维·服务器
飞奔的瓜牛1 天前
Wireshark 抓包实战:呼叫中心项目中的 SIP、DTMF 与 RTP 分析
运维·wireshark
Decay__1 天前
SQLServer 监控体系构建 —— sql_exporter + Prometheus + Grafana 全栈实战
运维·数据库·sql·mysql·架构