繁体   English   中英

Ubuntu 14.04找不到文件

[英]Ubuntu 14.04 can't find files

我正在使用Codeigniter 3,并使用Puphpet设置了一个virtualbox。 我正在使用Ubuntu 14.04和Apache2。 当我转到http:// ip_address /时 ,我终于能够成功访问默认的控制器路由,但是当我尝试访问另一个页面时,它显示“未找到”。

我将共享文件夹安装到/ var / www。 我还验证了我的所有文件都位于此处。

知道为什么默认控制器会加载,但对其他页面却找不到吗?

编辑:.htaccess文件位于根文件夹(/ var / www)中,这是.htaccess文件的内容:

# MAKE SURE TO LEAVE THE NEXT TWO LINES HERE.
# BEGIN DENY LIST --
# END DENY LIST --

RewriteEngine on
RewriteBase /
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
AllowOveride All

我还对/etc/apache2/sites-available/10-default_vhost_80.conf/etc/apache2/sites-available/25-av_fv5lzxiyh2xc.conf进行了更改

<Directory "/var/www">
    Options Indexes FollowSymlinks MultiViews
    AllowOverride All 
    Require all granted   

    <FilesMatch "\.php$">
      Require all granted
      SetHandler proxy:fcgi://127.0.0.1:9000
    </FilesMatch>

  </Directory>dexes FollowSymlinks MultiViews

更新:如果我输入http://ip_address/index.php/login之类的URL,则找到该页面;如果我输入http://ip_address/login之类的URL,则该页面未找到。

我通过在这里编辑默认配置文件来使其工作:

/etc/apache2/sites-available/000-default.conf

我将其添加到默认配置中:

<Directory /var/www>
    Options Indexes FollowSymLinks
    AllowOverride All   
    Require all granted
</Directory>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM