how connect to phpmyadmin from other hosts - permissions

I have a lan network with 2 computer and installed wamp on computer 1.
now I want to access to whole of phpmyadmin on computer 1 from computer 2 and make changes.
from users tab in root of phpmyadmin page I created a user.
I filled username field with 'root' and host field with my computer 2 IP address and left password field with "no password" and checked all Global privileges for my user.
now I connect to wamp on computer 1 from computer 2 and click on phpmyadmin link.
but It give me this error:
FORBIDDEN
you don't have permission to access /phpmyadmin/ on this server
what I must do now for solving this problem?

change below line in C:\xampp\apache\conf\extra\httpd-xampp.conf, you can directly open this file by
<Directory "C:/xampp/phpMyAdmin">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Require all granted
ErrorDocument 403 /error/XAMPP_FORBIDDEN.html.var
</Directory>

That error message has more to do with Apache blocking access, than with phpMyAdmin, or the MySQL user account created.
Your issue is with Apache's configuration, or more specifically your WAMP's configuration of the /phpmyadmin URL.
Find the configuration file where the \phpmyadmin URL Alias is set up. It possibly will have these lines in it -
<Location /phpmyadmin>
order deny,allow
deny from all
allow from 127.0.0.1
</Location>
Add another allow from IP.Address line in it to match the IP.Address of your other LAN system. Restart Apache.
If phpMyAdmin is not set up via an Alias (it is under WampDeveloper, not sure about other WAMPs like Xampp or WampServer), but is rather just a dump of its files in a DocumentRoot (website's webroot) sub-folder, check the .htaccess file there.
I filled username field with 'root' and host field with my computer 2 IP address and left password field with "no password" and checked all Global privileges for my user.
In this case, the host field will always be in relation to the location of MySQL, not to the system phpMyAdmin is being accessed from... If you are accessing MySQL via phpMyAdmin, the host field should always be - localhost. As phpMyAdmin is on the same system MySQL is. The only time you'd use another domain-name, host-name, or IP for host: is when you are accessing MySQL directly from another system. By directly I mean, not via a script or URL, but via some type of a client (which is almost always a binary/executable).

go to PHPMYADMIN.conf or search on it from wamp or wamp64
adjust on it as the following:
change
Require local
to be
Require all granted
And add your another client IP address after this line
Allow from localhost ::1 127.0.0.1
add this
Allow from CLIENTIPADDRESS
Restart Wamp or Wamp64

go to C:\wamp\alias\phpmyAdmin.conf
open phpmyadmin.conf in notepad
overwrite the below given code in it
<Directory "c:/wamp/apps/phpmyadmin3.3.9/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Allow,Deny
Allow from all
</Directory>
change here is allow from all only..

First just check you have installed php, mysql and apache correctly.
Now if are you able to access phpmyadmin from your local host then above things are installed correctly. If you want to access phpmyadmin from another host, make the entry of 2nd host in following config file
/etc/httpd/config.d/phpmyadmin.conf
<Location /phpmyadmin>
order deny,allow
deny from all
allow from 127.0.0.1 <2nd host IP address>
</Location>
Then save you httpd settings and stop
service httpd restart
And now you are able to access phpmyadmin from another host

Related

Accessing local host from another machine

I have seen many answers on this with what would appear to be simple solutions, none of which are working for me at this time.
I have WAMP install with Apache 2.4.33 32bit installed on a PC. I can access the site on that PC without a problem using the alias mySite.local.
The PC's host file looks like this
127.0.0.1 mySite.local
The remote lap top's host file is
192.168.1.114 mySite.local
That is the IP of the PC on the network.
httpd.conf
Listen 80
ServerName mySite.local:80
<Directory />
AllowOverride none
Require all denied
</Directory>
DocumentRoot "H:/Intranet/mySite_v2_www/public"
httpd-vhosts.conf
<VirtualHost *:80>
ServerName mySite.local
DocumentRoot "H:/Intranet/mySite_v2_www/public"
</VirtualHost>
I have tried disabling the windows firewall and virus checker on the PC.
The laptop appears to be getting there but being blocked. The message is..
Forbidden
You don't have permission to access / on this server.
Apache/2.4.33 (Win32) PHP/7.2.4 Server at mySite.local Port 80
So it looks like it can see Apache but is being blocked. So what else needs to be set to get access to the server?
Here are two of the links that I have been following to try and get this to work
Error message "Forbidden You don't have permission to access / on this server"
and
How do I connect to this localhost from another computer on the same network?
Thanks for any direction you can provide.
To complement the answer of Paul Neale:
Forbidden You don't have permission to access / on this server. Apache/2.4.33 (Win32) PHP/7.2.4 Server at mySite.local Port 80
That message is an answer from Apache. Disabling the windows firewall and virus checker on the PC won't have any effect, you are already reaching Apache there is not any networking problem.
Apache is receiving your request to access the root folder "public":
H:/Intranet/mySite_v2_www/public
But denies the request because, the directive Require local is enabled. This directive means, you can access to the content of public from the local server (localhost), which is the same to say 127.0.0.0 or localhost.
What you wanted is to tell apache that allows the access of certain IP address to the root directory "public".
When you changed the directive to Require all granted you are telling apache that, no matter who asks, give it access to / (root folder) in other words "public".
So, what you was searching for is "Access Control" in apache, and the directive Require can be used with IP address, here's the main document from Apache, this is an example:
Require host address
Require ip ip.address
It's important to differentiate between Network//Permissions problems. If you want to know if you are able to communicate (At network level) with Apache, you could do:
telnet <IP_APACHE_SERVER> <PORT_APACHE_SERVER>
#example: telnet 172.10.10.2 80
So after playing around will combinations for a day I found that in the httpd.conf I needed to change Require local to Require all granted in the section.
<Directory "H:/Intranet/mySite_v2_www/public/">
Options +Indexes +FollowSymLinks +Multiviews
AllowOverride all
# onlineoffline tag - don't remove
# Require local
Require all granted
</Directory>

Can't access web services via IP but through the host names it does

I'm using a server 2008 r2. There I've installed Wamp on port 8080, SSRS on port 8063 and Some IIS sites on various ports.
I've installed CCproxy on the same server.
The funny thing is, I can't access them via server IP:port (192.168.8.100:8080) But I can, however, access it by Host:port (Mainserver:8080).
Then I thought it might be a clash between those services and installed wamp on a windows 8.1 computer and even that I can't access via the IP.
Please help.
Thanks
it looks like you are trying to access your website by using the local IP range 192.168.1.100. In some WAMP default configs, the devs have set the apache config to disallow access except from localhost.
Try to open the httpd.conf file located at
C:\wamp\bin\apache\apache#.#.#\conf\httpd.conf
Find the <Directory "c:/wamp/www"> block and replace the Order Deny,Allow and everything that follows with Order Allow,Deny followed by Allow from all. The end result should look like something similar to this:
DocumentRoot "c:/wamp/www"
<Directory "c:/wamp/www">
Options Indexes FollowSymLinks
Order Allow,Deny
Allow from all
</Directory>
To be safe, look into the virtual hosts config file and see if you find any Order Deny,Allow directives and replace them as well. The file is located at C:\wamp\bin\Apache#.#.#\conf\extra\httpd-vhosts.conf
You can read more about Order Directive from the Apache Documentation

phpmyadmin domain name

I have setup an Ubuntu LAMP server, and I have had phpmyadmin working fine with my website. However, I have recently had to create a virtual host for my IP address to avoid a security issue with directory listings in Tomcat, and now I can no longer access phpmyadmin.
It used to be at 192.68.1.99/phpmyadmin, and the actual phpmyadmin files are located in
/usr/share/phpmyadmin
I have a domain name pointing at my sever which I can use to point at phpmyadmin - how do I configure this?
thanks
Try to add
Alias /phpmyadmin /usr/share/phpmyadmin
To your global configuration or to virtual host which serves 192.68.1.99:80
This will allows you to access it again on URL http://192.68.1.99/phpmyadmin
If you want to setup phpmyadmin to be available using domain name, it is very same,
just put this line into VirtualHost settings of server under which you want to access it.
If you receive errors like access forbidden, add also following lines:
<Directory /usr/share/phpmyadmin>
Allow from all
Deny from None
Order Allow,Deny
</Directory>
<Location /phpmyadmin>
Allow from all
Deny from None
Order Allow,Deny
</Location>

Cannot access wamp server on local network

I want to host a website on my local network. For some reason I can only access wamp in my local computer.
I have 2 computers in my network. Both computer A and computer B have wamp server installed. when I type the ip address of computer A from computer B I am able to connect to it. But when I do it the other way around it does not work! In other words when I type the ip address of computer B from computer A the browsers says: server at 192.168.0.120 is taking to long to respond.
Things that I have done in order to solve the problem on computer B: (remember I want to connect to computer B from computer A)
1) turn off the firewall
2) Uninstall wamp and reinstall it.
3) turn off the anti-virus.
4) turn off windows firewall
5) Place wamp online and after putting it online restart all services
after doing all those steps I still cannot connect to it from computer B!
I have not chaged any ini file plus I have uninstall it and install it again so why is it not possible to connect to it!? I have used wamp for the last 3 years and I have never experienced this.
Also wamp is the only web server that I have installed on this computer. I don't have IIS nor any other web server installed on my computer.
Turn off your firewall for port 80 from any address. Turn off 443 if you need https (SSL) access. Open the configuration file (http.conf) and find the lines that say:
Allow from 127.0.0.1
Change them to read
Allow from all
Restart the wampserver. It will now work. Enjoy!!
Perhaps your Apache is bounded to localhost only. Look in your apache configuration file for:
Listen 127.0.0.1:80
If you found it, replace it with:
Listen 80
Then restart Apache.
(More info about Apache Binding)
1.
first of all
Port 80(or what ever you are using) and 443 must be allow for both TCP and UDP packets. To do this, create 2 inbound rules for TPC and UDP on Windows Firewall for port 80 and 443.
(or you can disable your whole firewall for testing but permanent solution if allow inbound rule)
2.
If you are using WAMPServer 3 See bottom of answer
For WAMPServer versions <= 2.5
You need to change the security setting on Apache to allow access from anywhere else, so edit your httpd.conf file.
Change this section from :
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
To :
# onlineoffline tag - don't remove
Order Allow,Deny
Allow from all
if "Allow from all" line not work for your then use "Require all granted"
then it will work for you.
WAMPServer 3 has a different method
In version 3 and > of WAMPServer there is a Virtual Hosts pre defined for localhost so dont amend the httpd.conf file at all, leave it as you found it.
Using the menus, edit the httpd-vhosts.conf file.
It should look like this :
<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp/www
<Directory "D:/wamp/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require local
</Directory>
</VirtualHost>
Amend it to
<VirtualHost *:80>
ServerName localhost
DocumentRoot D:/wamp/www
<Directory "D:/wamp/www/">
Options +Indexes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
Note:if you are running wamp for other than port 80 then VirtualHost will be like VirtualHost *:86.(86 or port whatever you are using) instead of VirtualHost *:80
3.
Dont forget to restart All Services of Wamp or Apache after making this change
go Setting -> General and change url in WordPress Address (URL) and Site Address (URL)
enter your pc name or your ip address in place of localhost
before : http://localhost/wordpress-test
after : http://your-pc-name/wordpress-test
...and that's it..you can access wordpress from any pc in your LAN...!!!
I had to uninstall my anti virus! Before uninstalling I clicked on the option where it said to disable auto-protect for 15 min. I also clicked on another option that supposibly disabled the anti-virus. That still was blocking my server! I don't understand why Norton makes it so hard to literally stop doing everything it's doing. I know I could had solve it by adding an exception to the firewall but Norton was taking care of windows firewall as well.
Wamp server share in local network
Reference Link: http://forum.aminfocraft.com/blog/view/141/wamp-server-share-in-local-netword
Edit your Apache httpd.conf:
Options FollowSymLinks
AllowOverride None
Order deny,allow
Allow from all
#Deny from all
and
#onlineoffline tag - don't remove
Order Deny,Allow
Allow from all
#Deny from all
to share mysql server:
edit wamp/alias/phpmyadmin.conf
<Directory "E:/wamp/apps/phpmyadmin3.2.0.1/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
#Deny from all
Allow from all
I had the same issue, tried all nothing works, following works for me
Following is what i had
#onlineoffline tag - don't remove
Require local
Change to
Require all granted
Order Deny,Allow
Allow from all
I know this is an old post BUT I have been having problems getting WAMP server seen on my windows 7 pro network for days, tried all of the solutions offered (including changing windows system files) but still not working. finally in pure desperation I put everything on the system back as it was and installed WAMP Server on a different drive (E:\WAMP ) in my case. The result was it worked perfectly first time with no editing configs or messing with the system. Other users may wish to try this before reaching the 'tear your hair out stage', it certainly saved my sanity or what I have left of it
I hope this helps someone
Dave
If you are using wamp stack, it will be fixed by open port in Firewall (Control Pannel). It work for my case (detail how to open port 80: https://tips.alocentral.com/open-tcp-port-80-in-windows-firewall/)
I had the same problem but mine worked fine. Turn off your firewall, antivirus. Make sure your port 80 is enabled and both pcs are set to be remotely accessed. In each pc under users, add new user using the host ip address of the other pc. Restart all services. Put your wampserver online. It should connect

Allowing 0.0.0.0 access in WAMP

Everything is setup correctly, but I'm getting "403..... Forbidden You don't have permission to access / on this server." error's when I access my IP address or my TLD. Any help?
In your VirtualHost, make sure that you have access permissions set in the Directory block...
order allow,deny
allow from all
Check your DocumentRoot folder for an .htaccess file, it can override the above.
Aside from that, you can also get this error when your VirtualHost does not contain the proper ServerName or ServerAlias and the request ends up falling into the default httpd.conf setup.
Also consider trying out another WAMP package.
xampp (free) -
WampDeveloper Pro (commercial) -
WampServer (free)
You are probably making requests from ::1, which is IP6 127.0.0.1.
So just update your <Directory "c:/wamp/www/"> section at C:\wamp\bin\apache\ApacheX.X.X\conf\httpd.conf sections to:
Order Deny, Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Remember to also do it in all conf files of C:\wamp\alias
This way you preserve the apache security.