Hi, I'm trying the Phalcon web tutorial (https://docs.phalcon.io/en/latest/reference/tutorial.html).
I successfully display the index page.
However, when I try to access the signup page (for which I created the /app/controllers/SingupController.php as well as the /app/views/signup/index.phtml), I run into the following message:
The requested URL /signup was not found on this server.
I can't figure out what I am doing wrong; maybe something in my virtual host setup or .htaccess file?
Next here's my setup:
MY SETUP
-
I'm running it on a local apache2 server on Ubuntu 12.04.
-
I set up a HOSTS ENTRY in /etc/hosts:
127.0.0.1 phalcon-tutorial
- I set up the following APACHE VIRTUAL HOST in /etc/apache2/sites-available:
<VirtualHost *:80>
ServerAdmin [email protected]
ServerName phalcon-tutorial
DocumentRoot /var/www/phalcon-tutorial/public
<Directory "/var/www/phalcon-tutorial">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
<Directory "/var/www/phalcon-tutorial/public">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/phalcon-tutorial-error.log
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/phalcon-tutorial-access.log combined
</VirtualHost>
I created the following .htaccess file:
#/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^$ public/ [L]
RewriteRule (.*) public/$1 [L]
</IfModule>
#/public/.htaccess
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?_url=/$1 [QSA,L]
</IfModule>
Could anyone help me please?
Than you very much!
Andrea