douhoujun9304 2013-11-11 12:10
浏览 64
已采纳

.htaccess文件在Windows 7中创建但在Ubuntu 12.10中不起作用

I developed a project in PHP 5.5 and it has a .htaccess file. My whole project works perfectly fine in windows 7. In Ubuntu 12.10, whenever i try to check my project, i get this error message.

Object not found!

The requested URL was not found on this server. If you entered the URL manually please check your spelling and try again.

If you think this is a server error, please contact the webmaster. Error 404 localhost Apache/2.4.4 (Unix) OpenSSL/1.0.1e PHP/5.5.3 mod_perl/2.0.8-dev Perl/v5.16.3

My .htaccess file looks like this:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

There are two types of files in Logs folder for errors:

Path: /opt/lampp/logs
error_log
php_error_log

error_log file contains this:

[Wed Oct 16 05:38:11.044023 2013] [ssl:warn] [pid 5479] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Oct 16 05:38:11.044087 2013] [ssl:warn] [pid 5479] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Oct 16 05:38:11.044110 2013] [suexec:notice] [pid 5479] AH01232: suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Wed Oct 16 05:38:11.111342 2013] [auth_digest:notice] [pid 5480] AH01757: generating secret for digest authentication ...
[Wed Oct 16 05:38:12.041421 2013] [ssl:warn] [pid 5480] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Wed Oct 16 05:38:12.041443 2013] [ssl:warn] [pid 5480] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Wed Oct 16 05:38:12.041470 2013] [lbmethod_heartbeat:notice] [pid 5480] AH02282: No slotmem from mod_heartmonitor
[Wed Oct 16 05:38:12.047802 2013] [mpm_prefork:notice] [pid 5480] AH00163: Apache/2.4.4 (Unix) OpenSSL/1.0.1e PHP/5.5.3 mod_perl/2.0.8-dev Perl/v5.16.3 configured -- resuming normal operations
[Wed Oct 16 05:38:12.047835 2013] [core:notice] [pid 5480] AH00094: Command line: '/opt/lampp/bin/httpd -E /opt/lampp/logs/error_log -D SSL -D PHP'
[Wed Oct 16 05:41:38.971308 2013] [mpm_prefork:notice] [pid 5480] AH00169: caught SIGTERM, shutting down
[Mon Nov 11 05:36:18.038713 2013] [ssl:warn] [pid 5603] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Nov 11 05:36:18.050161 2013] [ssl:warn] [pid 5603] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Mon Nov 11 05:36:18.050220 2013] [suexec:notice] [pid 5603] AH01232: suEXEC mechanism enabled (wrapper: /opt/lampp/bin/suexec)
[Mon Nov 11 05:36:18.117059 2013] [auth_digest:notice] [pid 5604] AH01757: generating secret for digest authentication ...
[Mon Nov 11 05:36:19.135320 2013] [ssl:warn] [pid 5604] AH01906: RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Mon Nov 11 05:36:19.135347 2013] [ssl:warn] [pid 5604] AH01909: RSA certificate configured for www.example.com:443 does NOT include an ID which matches the server name
[Mon Nov 11 05:36:19.135377 2013] [lbmethod_heartbeat:notice] [pid 5604] AH02282: No slotmem from mod_heartmonitor
[Mon Nov 11 05:36:19.215465 2013] [mpm_prefork:notice] [pid 5604] AH00163: Apache/2.4.4 (Unix) OpenSSL/1.0.1e PHP/5.5.3 mod_perl/2.0.8-dev Perl/v5.16.3 configured -- resuming normal operations
[Mon Nov 11 05:36:19.215511 2013] [core:notice] [pid 5604] AH00094: Command line: '/opt/lampp/bin/httpd -E /opt/lampp/logs/error_log -D SSL -D PHP'

What is wrong with my settings? Please guide me.

  • 写回答

2条回答 默认 最新

  • dsiuy42084 2013-11-11 12:45
    关注

    Looks like you have SELinux enabled on your Ubuntu host. Try disabling it using one of the methods given in: http://www.thegeekstuff.com/2009/06/how-to-disable-selinux-redhat-fedora-debian-unix/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 gradio的web端页面格式不对的问题
  • ¥15 求大家看看Nonce如何配置
  • ¥15 Matlab怎么求解含参的二重积分?
  • ¥15 苹果手机突然连不上wifi了?
  • ¥15 cgictest.cgi文件无法访问
  • ¥20 删除和修改功能无法调用
  • ¥15 kafka topic 所有分副本数修改
  • ¥15 小程序中fit格式等运动数据文件怎样实现可视化?(包含心率信息))
  • ¥15 如何利用mmdetection3d中的get_flops.py文件计算fcos3d方法的flops?
  • ¥40 串口调试助手打开串口后,keil5的代码就停止了