The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Odd error with Apache- NO localhost.
newwebdesigner
post Aug 18 2014, 03:09 PM
Post #1


Newbie
*

Group: Members
Posts: 12
Joined: 15-August 14
Member No.: 21,405



I am having a odd error with Apache 2.4. I installed it, everything should be good, I start it, and I get a 404 error on localhost.I am new to all this, I am using the port 8080 but if I try localhost:8080 is still doesn't work. I don't have a clue as to what is wrong.

This post has been edited by newwebdesigner: Aug 18 2014, 03:12 PM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
newwebdesigner
post Aug 19 2014, 10:25 AM
Post #2


Newbie
*

Group: Members
Posts: 12
Joined: 15-August 14
Member No.: 21,405



Christian, I was watching a helpful video that made it work with mywebsite.localhost.Pandy- I tried that all with vituralhost,i don't understand why it is not working.
If you want to see the code, here is a snipit because I know if I copied the whole httpd.conf and httpd-vhosts.conf it would be very long post.
<VirtualHost *:8080>
ServerAdmin webmaster@mywebsite.localdomain:8080
DocumentRoot "c:/Users/MyUser/mywebsite"
ServerName mywebsite.localdomain:8080
ErrorLog "logs/mywebsite.localdomain:8080-error.log"
CustomLog "logs/mywebsite.localdomain:8080-access.log" common
</VirtualHost>

And then here is the line in the httpd.conf that I had to edit:

Include conf/extra/httpd-vhosts.conf
Also, oddly enough, even when I stop apache localhost:8080 is still up, with "it works!"

This post has been edited by newwebdesigner: Aug 19 2014, 10:29 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Aug 19 2014, 11:29 AM
Post #3


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,730
Joined: 9-August 06
Member No.: 6



IIRC correctly you must have an entry for each domain/subdomain.

Something like so.

CODE
<VirtualHost localhost>
DocumentRoot "c:/Users/MyUser/mywebsite"
ServerName localhost
</VirtualHost>

<VirtualHost mywebsite.localhost>
DocumentRoot "c:/dev/blog"
ServerName mywebsite.localhost
</VirtualHost>


I didn't quite follow everything in your example, so I stuck to localhost. See if that works and if it does you can use it as a starting point.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th April 2024 - 04:40 PM