Link to home
Start Free TrialLog in
Avatar of sharingsunshine
sharingsunshineFlag for United States of America

asked on

Bitnami Lamp Stack Need Vhost Help

I have installed my app in a Bitnami Lamp stack subdirectory off of the root.  When I try to access it using abc.com/sub it doesn't work.  But if I put in a test program in abc.com/abc.php it works fine.   I need this stack to have 4 sites on it.  

How do I set it up so I can 4 vhosts?

The first vhost is only a test and isn't propogated.  The rest will be added after the first vhost is completed.

Thanks,
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Do you want to setup a vhost or an alias?

abc.com/sub/...
or
sub.abc.com

If the first then you can setup an Alias in your httpd.conf file like this
<IfModule alias_module>
  Alias /sub "/path/to/your/folder"	
  ...
</IfModule>

Open in new window

Restart Apache and you should be able to access the /sub from abc.com
Avatar of sharingsunshine

ASKER

I put in your code
 </IfModule>

<IfModule alias_module>
  Alias /sub "/opt/bitnami/apache2/htdocs/thp"
</IfModule>

Open in new window

but it still doesn't work.  I get this message

https://gyazo.com/4ec58304f85fa6750c8b39cb91b1a56f

Open in new window


this is using the subdirectory prefix and without it I get the bitnami startup screen.

Please advise
I just noticed the /sub.   I changed it to /thp and restarted Apache but still no help.
I don't understand the message - that looks like a URL
it's a screenshot of the error.
That error has nothing to do with aliases - the address you typed in was not found.

What is the full url you are using does the root domain of this URL work?
Or are you asking how to setup Apache so it will serve pages for a specific domain?

There are two issues here

1. abc.com resolves and loads but you want to be able to access abc.com/sub where /sub is located in a different location on the system
2. abc.com does not resolve and you want to setup a virtual host so that your Apache installation handles requests for abc.com
It's really a yes and no.  

1.  abc.com is the ip number currently and when used it resolves to the bitnami welcome page.  Yes, I want to access /sub and its contents.  Eventually, I will need number 2.

2.  No, since it does resolve but only to the bitnami welcome page.  When I have all the domains on the server I will need virtual hosts for each domain.

When I put in abc.com/sub I get the error message I posted above.

So ultimately I need to know where to put the content for each individual domain and how to access it.
ASKER CERTIFIED SOLUTION
Avatar of Julian Hansen
Julian Hansen
Flag of South Africa image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I don't agree.  When I put in the ip  number it defaults in the url browser bar to http//1.1.1.1/sub

It seems the colon (:) being left out is why the server not found message is showing up.

Also, as I mentioned it resolves to the bitnami welcome page it is only when I add the /sub to the url that causes the issue.
It seems the colon (:) being left out is why the server not found message is showing up.
I am going on the information you have given us - you posted a screenshot showing a server not found - the reasons are not really important as that is the information you chose to share with us - it indicates ... the server was not found.

To go from that to trying to work out why aliases are not working is not really going to help until the server not found issue has been resolved.

Can you show us a screen shot of what the browser looks like when you enter abc.com/sub AND abc.com resolves to the server address on which the Bitnami stack is installed.
Thanks for the help.
You are welcome.