Virtual Host for wamp server running in port 85 - php

We have dedicated windows server where IIS running in :80 and Wamp running in :85.
I successfully created a Virtual Host for wamp server which is running in :85.
NameVirtualHost *:85
<VirtualHost *:85>
ServerName www.my.tv
ServerAlias my.tv
DocumentRoot C:/wamp/www/alpha
ErrorLog "C:/wamp/www/alpha/logs/error.log"
CustomLog "C:/wamp/www/alpha/logs/access.log" common
</VirtualHost>
yes the above code is working & site is running only when i hit www.my.tv:85 but not in www.my.tv
can someone advice on the above where i could configure to make the site run at www.my.tv

If you configure Apache to serve your site on port 85 then the browser (which will default to port 80) won't find it unless you give it the port number it needs.
If you need to see the site on port 80 then you need to configure it on that port. Since you have another server running on that port it's not an option.
One possibility is that you create a virtual site on your IIS server for www.my.tv, but have it redirect to the site on port 85. You can do this in the properties box, on the Home Directory tab.

Related

Wamp server not able access in internet after changing the port

I have changed the port number in apache in bitnami wamp stack by following changes in httpd.conf file.
Listen 8083
ServerName localhost:8083
After changing the server is not able to access in interenet. In localhost it is showing the home page.
I have added the :8083 after the ip address.Can anyone please help on this?
You don't need ServerName localhost:8083 just ServerName localhost. In browser:
localhost:8083

Creating a virtual host for laravel project

I am using localhost:8080. Does this make any difference while virtual hosting? when I enter lsapp.test in browser, it says page cannot be reached.
Try to change your port to 8080 in httpd-vhosts file
<VirtualHost *:8080>
...
...
...
# Other directives here
</VirtualHost>
then restart your apache server and access like this lsapp.test:8080.

I can't change xampp apache default port number

I changed the httpd.conf file lines:
Listen 80 TO Listen 8012
servername localhost TO servername localhost:8012
And still it trys to start apache at port 80, but can't because a system process is using it.
EDIT
No my question is still different because I already followed those steps listed in the possible duplicate question: How to change the port number of Apache in Xampp
you need to run xampp as an Administrator. it will fix it.

Request routing for apache and iis server

I am running my website(www.example.com) using IIS server. Now my requirement is to run website (www.example.com) from Apache Server for PHP and www.example.com/XYZ url from IIS server for ASP .NET.
is this routing possible?
Do you mean on the same Windows Server? On port 80?
I think it's not possible to run two services on one port. The server has to process an incoming request on port 80 before deciding which service it is routed to, and then each service has to accept the request before resolving the domain name. The server and services and no way of knowing which process the request is meant for before it's too late.
If you don't mind running one of the web services on a non-standard port, it should work. Have you tried?
You can use the reverse proxy function on apache.
a2enmod proxy proxy_http
and then route /XYZ to the IIS server (or IIS port) in the apache config
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ProxyPass /XYZ http://old.iis.server/
ProxyPassReverse /XYZ http://old.iis.server/
</VirtualHost>
restart apache and it should work fine.
Edit:
If it has to be on the same physical machine, IIS must be "moved" to another port. Both services can't bind to port 80(HTTP)/443(HTTPS). This is simply impossible. One port - one service.
So, change the port of the IIS-Server to e.g. 8080 (HTTP) and 8443 (HTTPS)
and use
ProxyPass /XYZ http://localhost:8080/
ProxyPassReverse /XYZ http://localhost:8080/

how to access sites without specifying port number in the url, after creating virtual host in Bitnami lampstack for ubuntu 14

Can some one please help me to create a virtual host in Bitnami Lampstack, which is installed on ubuntu 14.0.4, through which I can access my site without specifying port number in the URL as- http://mysite.local instead of http://mysite.local:8080 ?
I have Bitnami Lampstack 5.3.29 (64 bit) installed on my system (ubuntu 14.0.4). I have configured the virtual host file as follows
<VirtualHost *:8080>
DocumentRoot "/home/qainfotech/lampstack-5.3.29-0/apache2/htdocs/mysite/htdocs"
ServerName mysite.local
</VirtualHost>
which allow me access the home page of my site very easily by the URL http://mysite.loca:8080 but the home page it doesn't redirect properly.
So how can I configure virtual host to access my site without specifying port number in the URL ?
<VirtualHost *:80>
DocumentRoot "/home/qainfotech/lampstack-5.3.29-0/apache2/htdocs/mysite/htdocs"
ServerName mysite.local
</VirtualHost>
Defaut HTTP port is port 80.
So when you don't specify a port in your url, you are using port 80.

Categories