I simply began learning Zend. I handled to obtain the fundamental working (using zf create project
) during my local web server. Let us just say my project is known as square
The only real .htaccess which i have: square/public/.htaccess
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
httpd.conf
DocumentRoot "/home/amree/web"
<Directory />
Options FollowSymLinks
AllowOverride All
Order deny,allow
Deny from all
</Directory>
<Directory "/home/amree/web">
Options Indexes FollowSymLinks
AllowOverride all
Order allow,deny
Allow from all
</Directory>
NameVirtualHost square
<VirtualHost square>
DocumentRoot "/home/amree/web/square/public"
ServerName square
</VirtualHost>
hosts
127.0.0.1 square
I am running my application on Linux.
From what I have collected, I'm able to open (loaded with no problems) the website using:
- http://square/
- http://square/default/index/index
- http://192.168.1.10/square/public/
- http://192.168.1.10/square/public/default/index/index
However I can't open it up using:
- http://square/square/public (A mistake happened message from Zend)
- http://192.168.1.10/square/ (got a directory listing)
I additionally produce other web programs within the same web server. For instance, the meh application could be opened up using http://192.168.1.10/meh/ but can't be opened up using http://square/meh
My real question is, how do i load my Zend application without getting problems with other programs within the same server? Right now, I favor being able to access it using my local IP (192.168.1.10). It ought to be easy to open it up from another computer within the same network.
So, ultimately I ought to have the ability to load the Zend project using
- http://192.168.1.10/square
- http://192.168.1.10/square/public
- http://192.168.1.10/square/public/default/index/index
And I'm also able to open my other meh application using http://192.168.1.10/meh
Thanks ahead of time.
You can't indeed access the application using
- http://square/square/public
- While using
square
domain will suit your vhost and/square/public
is going to be rewritten to Zend, whom will attempt to operateSquare_PublicController::indexAction()
- While using
- http://192.168.1.10/square/ (got a directory listing)
- you have a directoy listing (permitted by
Options Indexes
in<Directory "/home/amree/web">
) since your .htaccess is situated inhttp://192.168.1.10/square/public
- you have a directoy listing (permitted by
Make an option between:
Or possibly try an Alias
in Apache
Alias /square /square/public