I tried to deploy a Symfony API with apache on port 8000. I can access the index.php (Symfony default page), but when I tried a route like http://{{ my_ip_adress }}:8000/api/users, I have a 404 error.
Apache file.conf
Listen 8000
<VirtualHost *:{{ http_port }}>
DocumentRoot /var/www/{{ http_host }}
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
<Directory /var/www/{{ http_host }}>
Options Indexes FollowSymLinks
AllowOverride All
Allow from All
</Directory>
<IfModule mod_dir.c>
DirectoryIndex ./app/public/index.php
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase ./
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ./app/public/index.php
</IfModule>
</VirtualHost>
It's my first deployment, so I don't understand how Apache works yet.
My Answer:
Rate this post
4 of 5 based on 3102 votesComments