Apache problem

I have a problem with my apache server. Every time I enable the virtual host config. in the httpd.conf the localhost is not available. I can’t create virtual host no matter how I tried. why this is happening?
! :slight_smile:

Consider this a sort of ‘capcha’: Are you qualified enough to administer an Apache server? In what environment are you operating?

windows OS 11. I am practicing how to create virtual host. I have no problem creating inside the default document root and directory in the apache htdocs. but every time I enable the virtual host config. the localhost is suddenly turn off and not available. I can’t create a virtual host no matter how I tried.

Can we assume you are the administrator of the local machine?

yes it’s just me i am slowly developing my project after finishing my html js and php lessons in codecademy.

Sorry for the rigga-ma-roll, just needed to establish where we are. It looks like you are setting up a testing server to host your PHP projects, now that we’ve got through the weeds.

Unfortunately I cannot help you resolve any issues, but the floor is now open for any other informed members to step forward. Truth be known that in all my years of working with PHP, I never used a testing server. It was all live. I just had to catch the white screens before anyone else did.

Bottom line, for all their immense value, I never trusted local results. Live is the only real test that needs to pass.

thank you. hope some experts will fetch inn… :slightly_smiling_face:

1 Like

Not sure what I can add, but for starters, make sure your server is on the volume root. It can be very hard to configure something that is on a path separate from that. Mind, I’m only theorizing. Apache should be installed at the very bottom of the volume, by my reckoning.

C:\Apache\

Again, what do I know having never installed a server before?

this is the default. C:\Apache24\htdocs. directory it’s fine no problem I can create anything inside the htdocs it work. What I am trying to is to use the alias feature of apache. i Have projects inside my D:\ file. according to apache documentation we can use the alias to create project outside of the default directory. I enable the virtual configuration to create virtual host. the problem is that localhost is not available when I enable the virtual host config. If I disable the virtual host config. the virtual host will work only the only problem is that everytime I access using the servername it will send it to the default directoy of apache with the message “It work.!” not to the intended address in my directory.

This is way out of my wheelhouse, but sniffs of cross-scripting as a possible issue. A virtual environment cannot have any side effects on its host environment, and neither should it be able to communicate with it.

thanks for the wisdom. the way I see the problem is in the usage of 127.0.0.1 aka localhost. my be I did something or miss something about that.

1 Like