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
Related
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
I install Drupal 7.56 in my PC with MAMP. After installation complete, drupal admin screen appears.
Then, I create virtual host named "cast.dev".
When I type "cast.dev" in browser, it does not show anything and only shows "It works !".
I also create a front page. It does not show also. Could anyone tell me which part am I need to do more? Thanks .
Try to add the follwing
<VirtualHost *:80>
ServerName myproject.local
ServerAdmin webmaster#localhost
DocumentRoot /home/user/path/to/myproject_folder
<Directory /home/user/path/to/myproject_folder>
Require all granted
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Then restart your Apache using the following command.
sudo service apache2 restart
Set up localhost file by adding the following code on the 'hosts' file from 'etc'.
127.0.0.1 myproject.local
For this,edit hosts using gedit with the following command :
sudo gedit /etc/hosts
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!
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
I'm developing a web with cakePHP (using MAMP as localhost) and I just configured a virtual hosts to the root of my project.
My /etc/hosts is
127.0.0.1 localhost
127.0.0.1 altair.loc
And my httpd.conf
NameVirtualHost *
<VirtualHost *>
DocumentRoot "/Volumes/Macintosh HD/Users/robotThree/www/"
ServerName localhost
</VirtualHost>
<VirtualHost *>
DocumentRoot "/Volumes/Macintosh HD/Users/robotThree/www/ALTAIR/altair/"
ServerName altair.loc
</VirtualHost>
With this I can access to my project typing http://altair.loc and all controllers and actions works perfectly (i.e. http://altair.loc/controller/action).
The problem is that all files accessed statically fails. For example http://altair.loc/css/main.css fails, but it works if I type http://altair.loc/ALTAIR/altair/css/main.css, as if the virtual host wasn't configured.
Do you know what could be happening?
Thank you in advance
Solved. In httpd.conf is necessary to check that Override is for all, it was an .htaccess and mod_rewrite issue:
<Directory />
Options Indexes FollowSymLinks
AllowOverride All
</Directory>