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" &
相关推荐
SelectDB7 小时前
Litefuse 开源并推出单进程轻量模式,25 秒就能跑起来的 Agent 可观测与评估平台
运维·后端·自动化运维
AlfredZhao8 小时前
Docker 容器时区不对,`timedatectl` 不存在怎么办?
linux·timezone
zzzzzz3102 天前
9K Star 炸裂开源!这个 C 语言写的代码知识图谱,把 Linux 内核索引压缩到了 3 分钟
linux·服务器·sql
XIAOHEZIcode2 天前
Linux系统鼠标偏移常见原因以及修复方案
linux·运维·游戏
用户0328472220702 天前
如何搭建本地yum源(上)
运维
A小辣椒3 天前
TShark:Wireshark CLI 功能
linux
A小辣椒4 天前
TShark:基础知识
linux
AlfredZhao4 天前
OCI 明明分配了 200G 系统盘,为什么 df 只看到 30G?
linux·oci
AlfredZhao4 天前
vi 删除指定范围的行,不用再反复按 dd
linux·vi
用户9718356334665 天前
银河麒麟 KY10 申威(SW64) 安装 nginx-1.16.1-2.p01.ky10.sw_64.rpm 详细步骤
linux