xiasohan
V2EX  ›  问与答

使用 typecho 搭建博客时 访问 http://服务器 ip/install. PHP 访问不到

  •  1
     
  •   xiasohan · Dec 26, 2019 · 2708 views
    This topic created in 2339 days ago, the information mentioned may be changed or developed.

    环境按照百度的安装的,也反复检查过了,,,,访问 http://服务器 ip/install.php 访问不到时就是 404,

    具体提示如下:

    Not Found The requested URL was not found on this server. Apache/2.4.18 (Ubuntu) Server at 47.98.129.240 Port 80

    实在不知道怎么解决,有没有大佬帮我出出注意

    Supplement 1  ·  Dec 26, 2019
    谢谢 @haimall 这位大佬,已经解决了,刚开始我也想到是路径问题,但是还是没有找对,麻烦大家了
    21 replies    2020-05-09 09:36:49 +08:00
    manami
        1
    manami  
       Dec 26, 2019   ❤️ 1
    开 ssh,让我上去看看
    noqwerty
        2
    noqwerty  
       Dec 26, 2019 via Android
    @manami 后继有人?
    xiasohan
        3
    xiasohan  
    OP
       Dec 26, 2019
    @manami 好像不太好把~~~
    coderdusk
        4
    coderdusk  
       Dec 26, 2019 via Android
    你这 ip 打开后还是 apache 默认首页,说明 typecho 没有放对位置没有覆盖默认网页
    U7Q5tLAex2FI0o0g
        5
    U7Q5tLAex2FI0o0g  
       Dec 26, 2019
    DocumentRoot 改了没???
    javashell
        6
    javashell  
       Dec 26, 2019 via Android
    rewrite 开了没
    xiasohan
        7
    xiasohan  
    OP
       Dec 26, 2019
    @littleylv 没有改,用的时 apache2,找不到 httpd.conf 文件在哪里,所以不知道怎么配置
    xiasohan
        8
    xiasohan  
    OP
       Dec 26, 2019
    @javashell rewrite 开了
    xiasohan
        9
    xiasohan  
    OP
       Dec 26, 2019
    @coderdusk 放的位置我看了好多教程是没问题的
    nvkou
        10
    nvkou  
       Dec 26, 2019 via Android
    locate index.html 覆盖就是
    xiasohan
        11
    xiasohan  
    OP
       Dec 26, 2019
    @nvkou 能具体说一下嘛
    U7Q5tLAex2FI0o0g
        12
    U7Q5tLAex2FI0o0g  
       Dec 26, 2019
    @xiasohan #7 配置多少都有些地方要改的,你啥都不做,甚至连 httpd.conf 在哪都不知道,就想网站能运行???
    找不到不会 google 吗,没谷歌不会必应吗
    oh
        13
    oh  
       Dec 26, 2019 via iPhone
    楼主我教你,既然不熟悉,没关注,服务器上装个宝塔面板,给你虚拟主机一样的便捷
    Buges
        14
    Buges  
       Dec 26, 2019 via Android
    人生苦短,不要浪费时间在折腾这些上,直接上 docker,web 服务用 caddy
    JinShu
        15
    JinShu  
       Dec 26, 2019
    你把文件目录路径贴出来看看
    xiasohan
        16
    xiasohan  
    OP
       Dec 26, 2019
    @haimall 这是放 typecho 的路径 /var/www/html/build
    steley
        17
    steley  
       Dec 26, 2019   ❤️ 1
    @xiasohan 已经不用 httpd.conf 了,/etc/apache2/sites-available/
    JinShu
        18
    JinShu  
       Dec 26, 2019   ❤️ 1
    http://47.98.129.240/build/install.php
    xiasohan
        19
    xiasohan  
    OP
       Dec 26, 2019
    @steley 嗯嗯,找到了 DocumentRoot 为 /var/www/html
    172644
        20
    172644  
       Apr 25, 2020
    老哥,你这个问题是怎么解决的?我怎么没看懂呀,我的 install.php 存放目录是 /www/wwwroot/ranxiao.vip 这个,请问怎么弄呢?
    xiasohan
        21
    xiasohan  
    OP
       May 9, 2020
    @172644 这个好久以前弄的了,不知道对不对,你找到这个配置文件 /etc/apache2/sites-available/把 DocumentRoot 修改成你的路径应该就可以了,如果不对别怪我啊。我记得是这样
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1669 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 16:28 · PVG 00:28 · LAX 09:28 · JFK 12:28
    ♥ Do have faith in what you're doing.