美文网首页
linux运维初试——Apache

linux运维初试——Apache

作者: SodaSea | 来源:发表于2017-06-28 10:15 被阅读0次

连接远程服务器

ssh 用户名@主机地址
输入密码

上传web项目(静态纯前端)

scp -r local_folder remote_username@remote_ip:folder_path

删除文件

rm <file>

删除文件夹

rm -r <folder>

删除 不需要询问

rm -rf <folder/file>

配置Apache

进入httpd.conf

cd /etc/httpd/conf/
vim httpd.conf

配置
  • ServerName 106.1X.XXX.XXX:80
  • DocumentRoot "/home/web/CarFlow"
  • <Directory "/home/web/CarFlow">
    AllowOverride all

    Allow open access:

    Require all granted
    </Directory>
  • <IfModule dir_module>
    DirectoryIndex login.html
    </IfModule>
  • AddType text/css .css
    AddType text/javascript .js
    PS: 没来得及验证去掉这两句话有没有影响,本意是识别css和js文件而不是把他们当成html
读写授权

//解决只加载html的问题,准确说是无权访问另一文件夹的布局模块
chomd -R 777 /home/web/CarFlow

重新启动apache

service httpd restart

发布成功!

相关文章

网友评论

      本文标题:linux运维初试——Apache

      本文链接:https://www.haomeiwen.com/subject/gioycxtx.html