WAMP conflicting with SQL Server port can't virtual host - sql-server

I had WAMP running fine using a virtual hosts so that I could do my local wordpress development on my PC
I needed SQL-Server-express for something unrelated so I installed that and WAMP failed to run (only 1 of 2 services worked)
I changed the Apache port defaults from 80 to 8080 and the MySQL from 3306 to 3307.
I reset, and WAMP seemed fine (2 of 2 services worked)
I can access http://localhost:8080 and see the WAMP page, but I can't use any virtual hosts I have setup
I went to httpd-vhosts.conf and this is contents of file. The latter part is what I have for my local wordpress dev site
# Virtual Hosts
#
<VirtualHost *:8080>
ServerName localhost
DocumentRoot c:/wamp64/www
<Directory "c:/wamp64/www/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
#
<VirtualHost *:8080>
ServerName woo1lynda.dev
DocumentRoot "c:/www/woo1lynda"
<Directory "c:/www/woo1lynda/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
why won't my virtual host woo1lynda.dev work after I changed ports?
The error I get is
HTTP Error 404. The requested resource is not found.

I just disabled SQL-Server reporting services which uses port 3306 that conflicts with WAMP
Under SQL-Server configuration manager → SQL Service Services
Also, services.msc → SQL Server reporting Services → Manual startup
so it doesn't have to run everytime I boot up PC

Related

pgAdmin 4 server mode port

following this tutorial, I've successfully installed pgAdmin4 in server mode. However, pgAdmin4 is accessible by my IP address on the default port. I would like access using another port like the 8081. I've tried by modifying the content of /etc/apache2/sites-available/pgadmin4.conf but without success. Thanks in advance
<VirtualHost *:8081>
ServerName my_ip
WSGIDaemonProcess pgadmin processes=1 threads=25 python-home=/home/user/environments/my_env
WSGIScriptAlias / /home/user/environments/my_env/lib/python3.6/site-packages/pgadmin4/pgAdmin4.wsgi
<Directory "/home/user/environments/my_env/lib/python3.6/site-packages/pgadmin4/">
WSGIProcessGroup pgadmin
WSGIApplicationGroup %{GLOBAL}
Require all granted
</Directory>
I've found the solution myself.
The steps are:
Configure Apache to Listen on each of the ports you want to service. Add Listen 8081 in the ports.conf file.
sudo nano /etc/apache2/ports.conf
Modify the content of pgadmin4.conf as follow
sudo nano /etc/apache2/sites-available/pgadmin4.conf
Type
<VirtualHost my_ip:8081>
ServerName my_ip:8081
WSGIDaemonProcess pgadmin processes=1 threads=25 python-home=/home/user/environments/my_env
WSGIScriptAlias / /home/user/environments/my_env/lib/python3.6/site-packages/pgadmin4/pgAdmin4.wsgi
<Directory "/home/user/environments/my_env/lib/python3.6/site-packages/pgadmin4/">
WSGIProcessGroup pgadmin
WSGIApplicationGroup %{GLOBAL}
Require all granted
</Directory>
Restart apache

virtual hostname instead of i.p. address in mediawiki

I am trying to replace my i.p. address from my mediawiki with a virtual hostname. My system information are
O.S.: Opensuse 13.1
Mediawiki: 1.26.1
apache2 and mysql
I have edited the /etc/apache2/vhosts.d/mydomain.conf file like this
<VirtualHost 123.456.78.90>
ServerAdmin webmaster#localhost
ServerName www.mylabwiki.org
DocumentRoot /srv/www/htdocs/mylabwiki
ErrorLog /var/log/apache2/myabwiki-error_log
CustomLog /var/log/apache2/mylabwiki-access_log combined
HostnameLookups Off
UseCanonicalName Off
ServerSignature On
<Directory "/srv/www/htdocs/cgi-bin">
AllowOverride None
Options +ExecCGI -Includes
Require all granted
</Directory>
<Directory "/srv/www/htdocs/mylabwiki">
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
I have edited the /etc/apache2/listen.conf file like this
NameVirtualHost 123.456.78.90
Then I have executed
vi /etc/hosts
123.456.78.90 www.mylabwiki.org
Then I restarted the apache2
service apache2 restart
My problem is, it works only locally. If I use the browser from the host computer, the domain 'www.mylabwiki.org' works properly.But, if I type from a remote computer www.mylabwiki.org and try to connect, it says that the url doesn't exist. However, if I type http://123.456.78.90/ then works perfect from the remote computer. Can anyone tell me where did I miss something! I can feel that I am just one step away, but unable to figure it out.
Your issue is that www.mylabwiki.org is known only on your localhost, because you edited the /etc/hosts to have a local DNS resolution. Your remote computer do not get that information to know where to go.
There is 3 ways to solve the issue:
you edit the /etc/hosts on the remote computer as well, but that means it will work on your localhost and remote computer, but not on nay other. So a real solution.
you have a DNS local server, and you edit the server to resolve the name to the IP address. That will work for all computers on your network, not the outside world.
you record this information in a domain name provide like name.com (or any other), so anyone in the world would know how to resolve the domain to the IP address. For sure it means the IP/computer can be accessed from outside your network.

Connect to multiple local sites on mobile

I have multiple local sites which I develop on my local machine.
I'd like to be able to access them on a mobile device while they are still local on my machine.
Using XAMPP these are example vhosts configs:
<VirtualHost *:8080>
DocumentRoot "C:/design and photos/agency1/website/public_html"
ServerName agency1dev.com
<Directory "C:/design and photos/agency1/website/public_html">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
<VirtualHost *:8080>
DocumentRoot "C:/design and photos/captives/website/public_html"
ServerName capdev.com
<Directory "C:/design and photos/captives/website/public_html">
Options All
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Windows hosts file
127.0.0.1 agency1dev.com
127.0.0.1 capdev.com
I understand I can use my machines IP address to reach e.g.:
http://196.168.2.3:8080
But this goes to the XAMPP dir, so, how do I access e.g. agency1dev.com?
Is this possible?
You can try using Finch, https://meetfinch.com
It's very easy to use (recently released a GUI for it) and just 'works' without having to do anything.
Full disclosure: I'm involved in the project.
The solution I found was using NGROK
Very easy to implement:
In cmd or some shell
Go to: C:\path\to\ngrok
Type:
ngrok http -host-header=myapp.dev 8080
Change myapp.dev to suit what you want to look at - and change port (8080) accordingly
Then look at output and it will give you a http and https url to navigate to on your device
Simple!

Problems with apache2 and virtualHosts

I am trying to set up a virtual host at localhost. I am installing symfony 1.4 on my ubuntu 12.04 LTS, but I got some problems.
I installed apache2, php5 and mySql. Localhost works so I assume that apache it's ok.
You can found symfony installation and configuration instructions here.
After several days these are my configuration files:
http.conf:
ServerName 127.0.0.1
/etc/apache2/sites-available/test:
# Be sure to only have this line once in your configuration
NameVirtualHost 127.0.0.1:8080
# This is the configuration for your project
Listen 127.0.0.1:8080
<VirtualHost 127.0.0.1:8080>
DocumentRoot "/home/user/test/web"
DirectoryIndex index.php
<Directory "/home/user/test/web">
AllowOverride All
Allow from All
</Directory>
Alias /sf /home/user/test/lib/vendor/symfony/data/web/sf
<Directory "/home/user/test/lib/vendor/symfony/data/web/sf">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
and localhost:8080 doesn't works.
UPDATE:
Ok, after several modifications my httpd.conf is the same:
ServerName 127.0.0.1
And my /etc/apache2/sites-available/test:
Listen 127.0.0.1:80
<VirtualHost 127.0.0.1:80>
DocumentRoot "/home/user/test/web"
DirectoryIndex index.php
<Directory "/home/user/test/web">
AllowOverride All
Allow from All
</Directory>
Alias /sf /home/user/test/lib/vendor/symfony/data/web/sf
<Directory "/home/user/test/lib/vendor/symfony/data/web/sf">
AllowOverride All
Allow from All
</Directory>
</VirtualHost>
If Apache use the port 80, remove this line in your conf:
NameVirtualHost 127.0.0.1:8080
Then replace all 8080 by 80 and try http://localhost. It should work.
edit:
Regarding the error could not bind to address 127.0.0.1:80 no listening sockets available, it seems you have an other server listening on the port 80.
Maybe it's a better idea to come back on the 8080 port (on the httpd.conf) and then update the ports.conf to set :
NameVirtualHost *:8080
Listen 8080
If you don't have a ports.conf file, find Listen in your main configuration file and do the update.
Verify you have your site test into /etc/apache2/sites-enabled/. if not do:
sudo a2ensite test
This command will enable the site test. Remember to restart apache.
Error message.
(98)Address already in use: make_sock: could not bind to address 127.0.0.1:80 no listening sockets available, shutting down Unable to open logs
It can be solved by commenting out the line Listen 80 in your httpd.conf file.
Regards
Rajkiran

Hosting multiple sites with Apache2

I have on a server machine a local domain called "localwiki.com" that points to /var/www/wiki and works fine.
The sites-available and sites-enable configuration:
<VirtualHost *:80>
DocumentRoot /var/www/wiki/
ServerName localwiki.com
ServerAlias *.localwiki.com
</VirtualHost>
I wanted to create a second local domain for /var/www/doxygen (which I can access using "serverIP"/doxygen).
Here is the localdoxygen.com config file created at /etc/apache2/sites-available/localdoxygen.com
<VirtualHost *:80>
DocumentRoot /var/www/doxygen/
ServerName localdoxygen.com
ServerAlias *localdoxygen.com
</VirtualHost>
I used "a2ensite" in order to create a symbolic link in sites-enable pointing to localdoxygen.com in sites-available:
sudo a2ensite localdoxygen.com
I also have reloaded the new configuration:
sudo /etc/init.d/apache2 reload
And restarted apache:
sudo service apache2 restart
But the domain (localdoxygen.com), still doesn't work.
Any suggestions on how to fix this?
To solve the problem I had to add an entry to /etc/bind in order to activate the DNS for the domain.
I think those conf files must end in .conf to be loaded: i.e. localdoxygen.com.conf
disable the default site - a2dissite default (!!!)
DNS correct
check in /etc/apache2/sites-enabled have your sites
reload apache2 /etc/init.d/apache2 reload
You need to define a NameVirtualHost in your apache2.conf to support multiple domains under one IP.
NameVirtualHost 123.456.789.123:80
or
NameVirtualHost *:80
see also Running several name-based web sites on a single IP address.

Resources