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" &
相关推荐
tntxia11 小时前
linux curl命令详解_curl详解
linux
扛枪的书生14 小时前
Linux 网络管理器用法速查
linux
SkyWalking中文站15 小时前
认识 Horizon UI · 1/17:SkyWalking 新一代可观测性控制台
运维·前端·监控
顺风尿一寸17 小时前
Java Socket 内核之旅:从 SocketChannel.read() 到 tcp_recvmsg 与 epoll 的完整调用链路
linux
雪梨酱QAQ19 小时前
Kubeneters HA Cluster部署
运维
江华森1 天前
Spring Cloud 微服务全栈实战:从 Eureka 到 Docker Compose 一文贯通
运维
江华森1 天前
Matplotlib 数据绘图基础入门
运维
XIAOHEZIcode1 天前
Ubuntu 终端美化全栈指南:Bash 到 Kitty 踩坑实录
linux·ubuntu·命令行
江华森1 天前
NumPy 数值计算基础入门
运维
唐青枫1 天前
别再只会用 cron:Linux systemd Timer 定时任务实战详解
linux