I am having debian vagrant. I have done virtual host configuration in its apache as servername https:local-dev02.sitename.com. And used in my windows machine host file 127.0.0.1 local-dev02.sitename.com.
I can access my site in windows' browser as https://local-dev02.sitename.com:8443/.
But I am unable to do
ping https://local-dev02.sitename.com
OR
curl https://local-dev02.sitename.com
OR
wget https://local-dev02.sitename.com
It is only possible to ping a hostname or IP address, but not an URL. So you need to put off the protocol like so
ping local-dev02.sitename.com
To reach your hosts via the hostnames, please add the IPs and hostnames to the /etc/hosts file.
Related
Apache and PHP are installed in the docker image. How to configure the virtual domain name of this machine, you can access curl www.test.com. I have configured the hosts file and httpd.conf, but it is still useless. How do I configure it?
You'll have to edit /etc/hosts and add this :
127.0.0.1 www.test.com
By eg you can do this in your dockerfile :
RUN echo "127.0.0.1 www.test.com" >> /etc/hosts
(or check your docker configuration if there is any option to do it)
Hi I have installed bitnami redmine to use agile.when ever I am writing localhost/ or 127.0.01/ it is accessing bitnami home page to link for redmine.
I want to change it so that it can be used with proper port number , for example i am thinking to give port 1234, so that localhost:1234 will be my address for it.
I have seen and tried {HOME}/apps/redmineplusagileconf/httpd-prefix , to change the access for redmine , but still not able to change the access with custome port.
Any suggestion would help me.
HTTP Port
Under the default configuration, Apache will wait for requests on port 80. Change that by editing the httpd.conf file and modifying the value specified in the Port directive. For example:
Listen 1234
ServerName localhost:1234
Also change the port in installdir/apache2/conf/bitnami/bitnami.conf in the VirtualHost directive:
<VirtualHost _default_:1234>
HTTPS Port
Apache waits for HTTPS requests on port 443. Change that by editing the installdir/apache2/conf/bitnami/bitnami.conf file and modifying the value specified in the Port directive. For example:
Listen 8443
<VirtualHost _default_:8443>
In both cases, restart the Apache server for the change to take effect:
sudo installdir/ctlscript.sh restart apache
NOTE: On Linux and OS X platforms, install the stack as the root user
to use a port number under 1024.
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/
I setup a nginx+mysql puphpet/vagrant image, with a virtual host "test.com". I mapped test.com to 192.168.56.101 on the host machine, and put an index.php file inside /var/www/test.
However, when I try opening the browser at the address test.com on the host machine I get no response. I feel like I'm missing something really simple, because I can ping 192.168.56.101. I also checked nginx logs on the virtual machine, but they are empty. Any clues where the problem might be? Am I not supposed to use it this way? I can ssh into vagrant just fine, and also I can access the mysql db.
In your Vagrantfile, you need to forward the port to your host machine.
For example map port 80 of the Vagrant machine to port 8080 of the host machine.
config.vm.network "forwarded_port", guest: 80, host: 8080
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.