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

Tuesday, August 2, 2022

[FIXED] How do I make apache2.4 configuration specific to a particular virtualhost so it doesn't affect other virtualhost on a centos server

 August 02, 2022     apache2.4, centos, linux, vps     No comments   

Issue

I have put in my include file which is in this directory /etc/apache2/conf.d/userdata/std/2_4/myusername/sub.domain.com/proxy.conf.

On the file I did proxy reverse to localhost port 5000 for my net core app. Then I did a post virtualhost include using include editor.

When I try to reach other domain on same VPS I get server temporarily unavailable to handle request error.but when I uncommented the proxy reverse on my include file i was able to reach other domain.

So my question is given the procedure I have taken, why is an include specified for a particular virtualhost affecting other virtualhosts on the server.

Proxy reverse code in the include file is code below

    ProxyPass / http://127.0.0.1:5000/
    ProxyPassReverse / http://127.0.0.1:5000/ ```

And this include was applied to virtualhost for the particular sub domain, don't know why it affects other virtualhosts.

Solution

what i did was i opened up the post_virtualhost_global.conf file found in /etc/apache2/includes/.

then i removed the include statement from the post_virtualhost_global.conf file, then it worked, i dont seem to understand how, but it worked perfectly anyway. i have also applied same practice for subsequent virtualhost proxyreverse includes i have done afterward.



Answered By - Ikem Michael
Answer Checked By - Mary Flores (PHPFixing Volunteer)
  • 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