PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, January 9, 2022

[FIXED] MAMP Apache2 new vhost 404 error

 January 09, 2022     apache, hosts, localhost, mamp, vhosts     No comments   

Issue

I'm trying to set up a new vhost like i did several times before. Im using a mac and mamp and usually configure like this:

/Applications/MAMP/conf/apache/extra/httpd-vhosts.conf i enter:

<VirtualHost *:80>
    DocumentRoot "/Users/riggi/PhpstormProjects/LaufschuhSilex/web“
    ServerName laufschuh.local
</VirtualHost>

in /etc/hosts i enter:

127.0.0.1       laufschuh.local

then I restart apache. This usually works and still works for many (>20) other local websites. Only the 2 new sites I'm trying to add wont work and return 404.

Any hints on where to look?


Solution

I believe this is a quotation mark formatting issue. Look how the close quote at the end of your DocumentRoot is formatted differently from the opening quote. To make sure the formatting is correct just copy the correct quotation mark (the opening quotation mark) and paste over the closing mark. This is something that can happen when text is copy-pasted from one place to another.



Answered By - MWT
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing