로컬 호스트/내 사이트/공공 - 작업 로컬 호스트/내 사이트/공공/index.php에/작업 - 작업 로컬 호스트/내 사이트/공공/작업 - 작동하지 않는 오류 (404)우분투 12.04 Laravel 및 모드 재 작성
는 거의 시도 모든 것과 여전히 문제가 있습니다. 나는에 모드 재 작성을 가지고있다 - 내가 사용 : sudo는 a2enmod vhost_alias이 를 다시 작성하고 서버를 다시 시작
내 htaccess로 파일 :
: 이<IfModule mod_rewrite.c>
Options +FollowSymLinks
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
내 등/아파치/사이트-사용 가능한/그와 같은 기본
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /var/www/
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
</VirtualHost>
AllowOverride를 All로 변경하면 "localhost /"만 작동하지만 "localhost/mysite"와 같은 사이트는 실행할 수 없습니다.
<VirtualHost *:80>
DocumentRoot /var/www/mysite/public/
<Directory /var/www/mysite/public/>
AllowOverride All
</Directory>
</VirtualHost>
을하지만 전혀 작동하지 않습니다 :
내가 좋아하는 파일을 다음 가상 호스트를 기본으로 추가하는 것을 시도했다.
이 대답은 delmadord에서 내 생명을 구하십시오! http://stackoverflow.com/a/24785009/1419350 – ebelendez