# WSL-Apache ### 檔案結構 #### 設定部份 不像 windows 版本一樣是統整在一個檔案,這邊是在一般設定的 httpd.conf 檔中使用 include 來引用其它設定 ~~~ /etc/httpd/conf 一般設定 /etc/httpd/conf.d 引用的額外設定 /etc/httpd/conf.modules.d 引用的模組設定 ~~~ #### log ~~~ /var/log/httpd ~~~ #### modules ~~~ /usr/lib64/httpd/modules ~~~ ### 設定內容請參考 [Windows-Apache](https://hackmd.io/@ek09sO7eQoOWqE81fmRrrQ/Hy8Ett1tv) ### CentOS 7 的坑 Failed to get D-Bus connection: Operation not permitted #### 無法執行 systemctl 啟用服務 目前的解決方法是換掉 systemctl ~~~ mv /usr/bin/systemctl /usr/bin/systemctl.old curl https://raw.githubusercontent.com/gdraheim/docker-systemctl-replacement/master/files/docker/systemctl.py > /usr/bin/systemctl chmod +x /usr/bin/systemctl ~~~ 參考網址: https://github.com/yuk7/CentWSL/issues/11 https://blog.csdn.net/chenyulancn/article/details/106289563 #### 再起不能? 換完之後執行 ~~~ systemctl start httpd ~~~ 會出現 ~~~ Oops, 1 unsupported directory settings. You need to create those before using the service. ~~~ 服務應該還是有正常執行,可執行 ~~~ systemctl status httpd ~~~ 查看,目前先不管這個錯誤訊息 ###
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up