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" &
相关推荐
ICscholar21 小时前
ExaDigiT/RAPS
linux·服务器·ubuntu·系统架构·运维开发
sim20201 天前
systemctl isolate graphical.target命令不能随便敲
linux·mysql
薛定谔的猫19821 天前
RAG(二)基于 LangChain+FAISS + 通义千问搭建轻量级 RAG 检索增强生成系统
运维·服务器·langchain
米高梅狮子1 天前
4. Linux 进程调度管理
linux·运维·服务器
再创世纪1 天前
让USB打印机变网络打印机,秀才USB打印服务器
linux·运维·网络
fengyehongWorld1 天前
Linux ssh端口转发
linux·ssh
昨夜见军贴06161 天前
IACheck AI审核如何实现自动化来料证书报告审核,全面提升生产效率与合规水平
运维·人工智能·自动化
知识分享小能手1 天前
Ubuntu入门学习教程,从入门到精通, Ubuntu 22.04中的Shell编程详细知识点(含案例代码)(17)
linux·学习·ubuntu
浩子智控1 天前
电子产品设计企业知识管理
运维·服务器·eclipse·系统安全·硬件工程
以太浮标1 天前
华为eNSP模拟器综合实验之-BGP路由协议的配置解析
服务器·开发语言·php