I have the following configuration in application.ini
[www.domain.com : default]
environment = production
It works fine with www but not without www. When I try without www then I get the following error message.
Fatal error: Uncaught exception 'Zend_Config_Exception' with message 'Section 'domain.com' cannot be found....in /home/user/public_html/domain.com/public/application/configs/application.ini'
Now I am bit confused if this is causing because of dns settings or virtual hosts file.
In virtual host configuration file contains the following
<VirtualHost *:80>
ServerName domain.com
ServerAlias www.domain.com
ErrorLog /home/user/public_html/domain.com/log/error.log
CustomLog /home/user/public_html/domain.com/log/access.log combined
DocumentRoot "/home/user/public_html/domain.com/public/web"
SetEnv APPLICATION_ENV "production"
<Directory "/home/user/public_html/domain.com/public/web">
Options Indexes MultiViews FollowSymLinks
DirectoryIndex index.php
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Please suggest. Any help if highly appreciated.Thanks in advance.
This is not related to DNS or your vhost. It's an INI issue. As far as ZF is concerned, there is no domain.com
section of application.ini. There's just a www.domain.com
section. In this particular case since you only have one setting to be inherited, here is a simple solution...
[www.domain.com : default]
environment = production
[domain.com : default]
environment = production
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.