Why does WAMP says this:"Forbidden You don't have permission to access / on this server."? - html

So I installed WAMP on Windows 7 and port-forwarded my Privat IP and I tried using my Public IP, but no luck.It's just giving me this error: Forbidden
You don't have permission to access / on this server.I tested it out with localhost and 127.0.0.1 and it worked, but with my Public Ip it dosen't.Please Help me!

It is because of the settings in you httpd.conf file. To correct the problem, follow the steps-
Click on the wamp icon.
Go to, Apache -> httpd.conf
Now search for "Controls who can get stuff from this server."
See below that, there should be a line "Deny from all".
Change it to "Allow from all".

To allow your Apache server to be accessed from the internet you need to tell Apache that it is allowed to accept connections from any IP address
Edit httpd.conf using the wampmanager menus links.
Find this snippet in the config file
# onlineoffline tag - don't remove
Order Deny,Allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
Allow from localhost
And as you are using Apache 2.4.x change it to
# onlineoffline tag - don't remove
Require all granted

Related

Finding MySQL localhost URL and/or accessing phpmyadmin

Going around in circles. Please help, I enter http://localhost into safari on my mac and receive: It works!
However, I cannot figure out how using MySQL workbench I can find the URL. I am looking to code JSON in xCode to retrieve data from my local MySQL database, however, I do not even know the URL to access it.
My port is on 3306. I have tried http://127.0.0.1:3306 - and get a failed to open.
Do I need myphpadmin or can I go direct to MySQL?
I have tried saving a copy of MyPhPAdmin under Users>MyUserName> but this did not work when I ran: http://localhost/myphpadmin
Should the file be saved elsewhere? When I worked on Python weeks ago I run it under a different location then was recommended (Under the Python X.X cache folder) whereas online people simply ran it from their Users>MyUserName> folder. I am on the latest Catalina OS X.
Tried http://localhost/usr/local/mysql-8.0.20-macos10.15-x86_64/phpmyadmin/ - 404 not found
With MySQL, you can connect via localhost "socket" or networking "TCP/IP" connections. The user accounts in MySQL exist separately from each other, so if your user account exists with host value 'localhost' the TCP/IP connection probably won't work for you. Also note that, depending on how you installed MySQL and how it's configured, it might not even listen for network connections. Normally, localhost is preferred if you are on the same machine.
In MySQL Workbench, you need to give the hostname or IP address when selecting "Standard (TCP/IP)" from the "Connection Method" dropdown. This is simply the hostname or IP address, not a complete URL or web site. So you'd set the hostname to "127.0.0.1" or "192.168.9.34" or whatever. Again, Local Socket/Pipe is usually a better choice in most cases.
MySQL uses its own networking port (3306) and communication protocol, so using http://127.0.0.1 is incorrect as it isn't using the http protocol. Likewise, if you would need to change the port for some reason, specify that in the port field rather than as a part of the hostname.
As for phpMyAdmin, you would install that to a folder that is handled by your web server, then access it through the URL/path exposed by the web server — by default, your user home directory is not shared to the web (and rightly so, I don't want all of my documents and files shared with the world!). Put the phpMyAdmin folder in your web root and you'll have better success. Which folder that is probably depends a lot on which webserver you are running, how it is installed, and how you configured it.
I won't comment on the Python scripts you've run in the past, as my experience with serving Python to the web requires adjusting some settings in my nginx configuration and I won't want to confuse you compared to the tutorials you're following.

Why i can not connect to admin panel/client by domain?

I try install ejabberd on my server. Then i install it, i edit ejabberd.yml file. Add domain in hosts section. When I try to connect to the admin panel by domain, it just doesn’t connect. But if I connect by ip everything works. What should I do ? Where to look ?
it just doesn’t connect
Does ejabberd show the connection attempt in the ejabberd log file?
If yes: I guess the web browser also requests you an admin account and password. You will have to register a new account in ejabberd, grant it admin rights in the configuration file, and restart ejabberd.
If nothing shown in the log file, then maybe your web browser doesn't know how to connect to ejabberd. Maybe you need to setup DNS.

How to set up www directory to public? WAMP

I cant seem to find any good solution for my issue so I hope this question will be answered once and for all.
First, I understand that by hosting my html files online directly from my PC means to loosen up my PC security and that can be dangerous. But I am fine with this as this is just my testing laptop. Nothing important or whatsoever in here.
So lets start with the main issue. I have port forwarded the port 3306, 80, 8080, and 2727(which I plan to switch the apache port to this)
Tested port online and result is open.
In my apache httpd.conf file, here is what I have setup..
Listen 0.0.0.0:2727
ServerName xxx.xxx.x.xx:2727 (which is my private ip)
<Directory "c:/wamp/www/">
Options FollowSymLinks Indexes
Allow from all
Order Allow,Deny
AllowOverride All
Require all granted
</Directory>
I am now able to access my index.html in the wamp www directory by typing 127.0.0.1:2727 in the url (same goes to /phpmyadmin)
What should I do next to make sure my public ip can access the index.html?
Example, when I enter my public ip like this 175.162.154.18:2727, it just shows connection timed out.
Extra info if this helps :
My WAMP is orange.
I have the MYSQL Community Edition in my PC.
My WAMP version is 2.5
Apache version is 2.4.9
MySQL version is 5.6.17
Apache service test port 80 is not used.
I apologize in advance if my question seems difficult to understand but I will try my best to provide as much information as per request.
Modify apache httpd.conf file
Listen 2727
Basically WAMP and MySQL Community Edition does not work quite well together.
What I did was uninstall every program and files related to MySQL and WAMP. Restarted my PC and continue to delete existing folder related to both MySQL and WAMP.
Then, I installed a fresh WAMP again and it is finally green in color! Hooray!
So I head over to the httpd.conf file and edited Listen 80 since it is the default and my ISP is not blocking port 80 and ServerName 192.168.0.x:80 which is my Private IP address. I did not modify any other than this in the file and when I type my public ip by using my mobile data network, it connected successfully to my local website!
Conclusion to set-up your own website ONLINE on your PC (with WAMP) :
Obtain your private ip address (can be obtained from cmd by typing ipconfig)
Login to your router and port forward the port 80 (or another if your ISP is blocking port 80) under your PRIVATE ip address. Note : I port forwarded both TCP & UDP.
In Apache httpd.conf file, edit the Listen to your port number that you have port forwarded. (Eg. Listen 80)
Edit the ServerName below to ServerName xxx.xxx.xx.xx:80 where the ip is your private ip address. If you use a different port, change the 80 to your own port.
And basically that is it! Type your public ip in your browser url and done! Note: If you use another port you will need to type in your port number as well eg. 177.122.140.13:8080 (If port 8080 is what you chose)
Result :

When trying to connect through a proxy server TortoiseHg for Windows says "SSL error: unknown protocol"

The scenario:
You're behind a proxy server on Windows. You've configured TortoiseHg to use a proxy server; that is you've entered a server name/IP and port number. You are able to connect to the internet using Internet Explorer. But when you try to pull or push and it produces the error message "SSL error: unknown protocol".
(I plan to answer this myself.)
The cause is that Internet Explorer is using an automatic proxy configuration script and TortoiseHg is using a particular proxy server. IE is not using the same proxy server because the automatic script picked a different proxy server.
The solution is to enter the proxy server used by TortoiseHg in IE's connection settings, or figure out which proxy server you're using at the moment and tell TortoiseHg to use that one. You may need to browse an external web site before TortoiseHg can connect.
You can figure out which proxy server you're using by browsing with IE and then running the DOS command:
netstat
and you'll see some connections in the Foreign Address column on port 80 or 8080 (common proxy server ports).
In addition to your excellent tip, I offer one more...
If your company is using an automatic proxy script, then the proxy used for web browsing may not be the one you need for Mercurial. Thus if you try the proxy you find via netstat, and you get "getaddrinfo failed" errors in tortoise, then try this...
Get the proxy script address: IE->config->Internet Options->Connection->LAN ?Settings. Copy the url from the "Address" box.
Browse to that address and save the file to disk.
Open that file in notepad and scroll to the end, it probably ends with something like-- return "PROXY ipaddresshere:port" that's the IP and port you need.
Plug that IP and port into tortoise: right-click the repo, click settings, click proxy, put the ip and port into the Host field. I generally don't need user and password so try without it first.

Localhost 's subdomain with port numbers, how to?

We know that to add a subdomain for localhost, we open and edit the host file by adding lines such as:
127.0.0.1 localhost
127.0.0.1 abc.localhost
127.0.0.1 xyz.localhost
My problem is that: if I browse abc.localhost:88 I get the below error:
Bad Request - Invalid Hostname
HTTP Error 400. The request hostname is invalid.
Why doesn't the URL abc.localhost:88 browse to 127.0.0.1:88 ?
Please help.
Because you need to an entry for abc.localhost to your hosts file. If you already have, then make sure that your webserver is listening on port 88.
If you are using IIS, make sure that you have added a binding to the correct hostname (abc.localhost).
As well as putting the entry in the client's hosts file, you will need to add the appropriate host header abc.localhost to the IIS site that's configured for port 88.
In IIS manager (inetmgr.msc), website properties, website tab, advanced, and add your host header there.