I have set up a restriction on my /user/phpmyadmin/apache.conf file so that only I can access the phpmyadmin page.
Order deny,allow
Deny from all
Allow from 92.8.xxx.xxx
I have a dynamic ip address and everytime my router gets reset I have to change the ip address in the apache.conf file.
Is there a way around this issue?
I haven't tried this myself but it should work:
Go to http://www.no-ip.com/ and register a free domain. Download one of their clients and run it on your pc. It will automatically update your external ip address to that free domain. You can then just put that domain address directly: eg
Allow from example.serve.com
NOTE: the client app does need to run on your pc 24/7 so it can keep updating.
Related
I just set up a DirectAdmin server. What I'd like to accomplish is disabling http://example.com:2222 on certain websites. Is that possible?
Sorry but according this link it seems you can't do that!
If you point the domain to a dedicated IP then you can block access to 2222 on the IP with firewall.
There are no other options.
anyway if we assume you could do this other users also can access your directadmin with your IP address like this :
1.2.3.4:2222
I really don't know why you wanna do this but maybe changing your server port is good option..
How I can access the temporary URL the host provided (such http://server9.company.com/~myname as my domain or any other domain without tralling slash before DNS update?
For example: Access http://server9.company.com/~myname as http://www.example.com
I do not have a dedicated IP
If you are running a Windows OS then you can update your hosts file to include the desired name and the IP address of your shared hosting box.
In Windows 7 the file is located at C:\Windows\System32\drivers\etc\hosts There should be a couple of examples in the file but you basically want to add;
<ip of hosting server> www.example.com
If you are using a different OS please let me know so I can update the answer.
I'm in the process of launching a new website. I migrated all the code to the new server. The admin at the new host told me that I have to add an entry to my hosts file and then I will be able to see the website. So essentially he had me add:
111.222.3333.4444 example.com www.example.com
These are example, but after doing this, it worked. My question is, is how? If I visit the IP directly in my browser I get a 403 Forbidden error. Does the host have a way to resolve this IP to a location on their server if resolved from a domain name? I'm just confused as to how this works. I understand that by changing the IP address I can get the domain name to resolve to any IP, but I'm wondering why, on the hosts end, does this now resolve this way, but not by typing in the IP directly.
Thanks!
Does the host have a way to resolve this IP to a location on their
server if resolved from a domain name?
Not exactly. Your browser, when sending the request to the IP address, will send one important piece of information called 'Host header', that is the actual host name as you typed in your browser.
You usually can not open the website just by entering the IP address in your browser's address bar because web servers (and possibly many other network components that are between you and the web server) often do not host only one web site on that IP address so they rely on exact domain name typed in address bar to serve the right content.
You can test this by using one of the browser add-ons that allow you to add your own headers. Add header named 'Host' with the value 'example.com' and with that try to open your site by typing only provided IP address.
I have a Linode server operating under a single IP Address. I access various websites via the single IP addresses in the following format: http://x.x.x.x/mysite1
Is it possible to access my individual websites, mysite1 etc, via names set in /etc/hosts?
In /etc/hosts I tried setting:
x.x.x.x dev.mysite
But, attempting to access my website via http://dev.mysite results in a webpage not found error.
Is what I'm trying to accomplish possible?
As long as you have made the /etc/hosts modification on the machine that is trying to access the website, then yes this is possible. Although you will also have to modify your Apache config so it knows which website to display when "dev.mysite" is requested. My Apache knowledge is rudimentary but I believe you want VirtualHost for this.
If you want other people to access the website without modifying their hosts file, you will need to buy a domain. For instance, if you buy xyz.com, you can put your sites under site1.xyz.com, site2.xyz.com and so on.
I believe Your /etc/hosts needs no change . dev.mysite already points to mysite.com which has an entry in /etc/hosts
You need to modify your web server (nginx / Apache)listening in port 80 to accept requests on dev.mysite
forgive the trivial question but I don't understand how to use ip addresses properly to deny access to my site. Let's say i have got the web site www.mywebsite.com. Suppose I have the following 3 ip addresses from my office machine:
ipv4: 192.1.2.3
default gateway: 192.1.2.345
and the global ip for my network: 456.34.56.78 (retrieved using www.globalip.com)
Now I would like to grant access to any user in my network hence i would have thought that the right number to use is the global ip 456.34.56.78 common to all machine in my office:
I am using the following code:
# redirect all visitors to alternate site but retain full access for you
ErrorDocument 403 http://www.bbc.com
Order deny,allow
Deny from all
Allow from 456.34.56.78
but it is not working. It is redirecting all machine in my network as well as external ones.
What I am doing wrong? Thank you for your help