2015-11-19 51 views
0

我在httpd.conf文件中有这个配置。apache上的虚拟主机

#NameVirtualHost <ip_address> 

<VirtualHost <ip_address>:80> 
    DocumentRoot /var/www/<domain_folder> 
    ServerName <doman> 
    ErrorLog logs/<doman>-error_log 
    CustomLog logs/<doman>-access_log common 
</VirtualHost> 
在此配置后

如果键入“http://domain.com”它显示的主页 有任何问题,但是当我点击联系人页面“http://domain.com/contacts/” 其显示404错误。

是这个配置错误吗? 注意:这是aptana市场(magento)应用程序

如果我输入“domain.com/index.php/contacts/”;它的工作正常。

+0

如果我输入“http://domain.com/index.php/contacts/”其工作正常。 –

回答

0

您需要在您的magento主机上启用.htaccess。在Apache默认配置中,您可以添加以下内容:

<Directory /var/www/> 
      Options Indexes FollowSymLinks MultiViews 
      AllowOverride All 
      Order allow,deny 
      allow from all 
    </Directory> 

这应该可以解决问题。

+0

更改了apache配置文件,但问题仍然存在。请你能劝我? –

+0

您是否在更改后重新启动apache? 'sudo service apache2 restart'。也看看'.htaccess'文件。尝试用'RewriteRule。* /index.php [L] ' – kaigorodov

+0

'替换'RewriteRule。* index.php [L]'行。是的,我重申了服务器 –