php - running laravel on a different port -


i'm using bitnami mampstack on os x 10.9. because inherited laptop, had set apache under mamp listen on port 8888. tweaked listen on 8889 , added following virtualhost in httpd.conf file:

<virtualhost *:8889>     documentroot "/applications/mampstack-5.4.26-0/apache2/htdocs/codebright/public"     servername localhost     <directory "/applications/mampstack-5.4.26-0/apache2/htdocs/codebright/public">         require granted     </directory> </virtualhost> 

i followed example here (so source code matches his). index blade works, edit, create, , delete blades return 404.

as testing, discovered http://localhost:8889/create returned 404, http://localhost:8889/index.php/create returned correct view. also, browsing http://localhost:8888/codebright/public/create works expected.

so...me being kinda new laravel , mvc frameworks in general, there way can have installing running on port 8889?

your virtualhost working should, have sure public/.htaccess file in place:

<ifmodule mod_rewrite.c>     <ifmodule mod_negotiation.c>         options -multiviews     </ifmodule>      rewriteengine on      # redirect trailing slashes...     rewriterule ^(.*)/$ /$1 [l,r=301]      # handle front controller...     rewritecond %{request_filename} !-d     rewritecond %{request_filename} !-f     rewriterule ^ index.php [l] </ifmodule> 

this file rewrites urls removing /index.php them.

edit

also, check if have mod_rewrite installed , enabled, because .htaccess uses it, in ubuntu/debian, enable it, have execute:

sudo a2enmod rewrite 

Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -