Apache :: Virtualhost Order Deny Allow Works Only On Localhost
Jun 17, 2013
I have vhost setup for test of a new website. I want to allow access on the localhost, and, from one IP from the Internet (redacted). Apache serves the site just fine on the server but I can't access the site from my the "xxx...." IP.
I'm using a physical path to test from the public IP as follows:
Quote:
http://xxx.xxx.xxx.xxx/~user/test/index.html
Apache v2.2
RHEL6
UserDir configured/running
SuExec configured/running
Below is the relevant vhost block in httpd.conf:
Code:
<VirtualHost *:80>
ServerName test
ServerAlias test
DocumentRoot /home/user/public_html/test
<IfModule mod_fcgid.c>
[Code] .....
I don't have a FQDN as yet, so I just made a entry in /etc/hosts as follows:
Code:
127.0.0.1 test
Here is an excerpt from the Apache error log:
Quote:
[Mon Jun 17 12:02:16 2013] [error] [client xxx.xxx.xxx.xxx] client denied by server configuration: /home/user/public_html/test/index.html
I've checked the firewall and the /etc/hosts.allow- that's not it. I've read the Apache docs and in the vhost block Allow should be evaluated last, and apparently is matching localhost but is not matching my IP.
View 5 Replies
ADVERTISEMENT
Jun 17, 2013
I have vhost setup for test of a new website. I want to allow access on the localhost, and, from one IP from the Internet (redacted). Apache serves the site just fine on the server but I can't access the site from my the "xxx...." IP.
I'm using a physical path to test from the public IP as follows:
xxx.xxx.xxx.xxx/~user/test/index.html
View 3 Replies
View Related
Nov 22, 2013
My customer wants a Windows system - but I'm rusty at best in Windows.I downloaded VC11 x86 Thread Safe (2013-Nov-13 20:57:44), unpacked it, moved it to it's own directory, edited httpd.conf (no auto installation) and confirmed it was working (localhost/index.html)
I added PHP and ran a PHP info - a little trouble getting the php.ini found.Apache seems to work fine on the local system - either localhost/index.html or nn.nn.nn.nn/.But remote browsers timeout when attempting to connect.
1. I've opened command as administrator and run httpd.exe directly
2. I've installed httpd.exe as a service, opened it's properties window and started it from there
3. Changed the listen port to 8080
4. netstat sees the remote browser with a waiting connection - and the local service
5. The Windows system is on my Mac network (same systems where the remote browser is) and I have transferred megabytes of files between the two systems.
In Component Services - the Apache2.4 service shows Log On As 'Local Service' - I'm guessing it should show as 'Network Service.I tried changing this - used the local user login - restarted the service. I didn't see any way to change it to 'Network Service'. Perhaps this is the problem?
ODDLY - the remote browser worked briefly - then failed with the same 'time out'.I'm guessing this is something simple that I don't understand about Windows - (then again, since I don't understand much about Windows, it could be complicated too).
View 4 Replies
View Related
Jul 7, 2009
I just installed wamp here on my laptop to set up a developer machine for my website. I am used to going into the browser and just typing in "localhost" and having it bring up the test website. I'm sure there is probably something wrong with the configuration of the wamp files because it works for 127.0.0.1.
View 4 Replies
View Related
Dec 10, 2013
I am really having trouble getting a virtualhost to work for an SSL certificate.. my browser just will not load the page..I have tried several different articles on how to setup a virtualhost and none of them seem to work.
My ssl.conf [URL] .....
*Note: I did purchase an SSL certificate - it is not self signed.
View 13 Replies
View Related
Oct 8, 2013
What is the proper syntax to perform a redirect within the <VirtualHost:443> section of the httpd.conf file?
The issue is: I have an existing login URL path that has changed slightly. As an example, let's say the old URL is:
"https://www.something.net/item1/item2/login.jsp" but now there's a "new" name for 'item2'.
I only want a user to be automatically redirected to the "new" path, but is ONLY triggered when the "old" login URL path is entered and nothing else.
View 2 Replies
View Related
Jan 14, 2013
I have substituted the domain names and DocumentRoot folders for generic titles, so I will refer to those where applicable in the thread as well.
Here is my httpd-vhosts.conf:
<VirtualHost *:80>
DocumentRoot "C:WebServerwww"
</VirtualHost>
<VirtualHost *:80>
[Code] ....
View 1 Replies
View Related
Feb 9, 2014
Running Apache 2.2.22 on Ubuntu 12.04...Here's (in addition to default) my papertower config in sites-available: URL....
When I restart, I get this message: [URL] ....
I'm coming from Apache on Windows and trying to set up the same workflow I had there. Basically, if I placed a folder in /www/papertower/ it would become accessible via directoryname.papertower.dev after adding the host.
I'm having a strange issue getting it going again. Oddly, when I didn't have the wordpress config set up properly and went to site.papertower.dev, it would give me the "failed to connect to database" message. This made me happy, as it meant it was pointing at the right folder. Once I fixed the database config file, however, and go to site.papertower.dev, it thinks for a moment, then goes to www.site.papertower.dev and gives me a "Oops! Google Chrome could not find www.site.papertower.dev".
I double-checked that all the appropriate mods were enabled (especially rewrite), but that hasn't made a difference.
View 4 Replies
View Related
Feb 9, 2007
I edited the /etc/apf/deny.hosts_rules files, then removed all lines from the file and finally restarted apf so it can restart with no deny host listed. But that is not working... the file appears empty or again with the rules removed before.
iptables -L -n shows the same banned hosts as dropped.
I already tried.. remove the deny hosts IPs from the file, then ran "iptables -F", then "service iptables save", and finally restarted apf and the deny IPs still there
View 6 Replies
View Related
Oct 11, 2012
Does the apache virtualhost environment lower the web or apache server's security? virtualhost has no security issues.
View 3 Replies
View Related
Apr 6, 2008
2008-04-06 08:52:32.597ERRORApache Binary Path must be set properly in order replace Apache, fall back to 'Reload on configuration file change'.
2008-04-06 08:52:32.602WARN[configerver:listener] No listener is available for normal virtual host!
2008-04-06 08:52:32.604ERROR[config:template:centralConfigLog] Listener [Default] does not exist
2008-04-06 08:52:32.605ERROR[config:templateHP_SuEXEC] Listener [Default] does not exist
2008-04-06 08:52:32.605ERROR[config:template:EasyRailsWithSuEXEC] Listener [Default] does not exist
2008-04-06 08:52:32.617WARNStandard Edition only support up to 5 Apache vhosts.
I did everything on the litespeed setup I was soppose to found at their wiki site. But still I recieve these errors, LiteSpeed works on my server because httpd is disabled and LiteSpeed is responding to request now.
View 8 Replies
View Related
Sep 13, 2014
I am having to restart https after a reboot in order to get the virtual hosts working.
If I DON'T restart https, all I get is the system default page and NOT the individual vhost index pages.
View 4 Replies
View Related
May 28, 2008
I am seeking a solution such that the apache vs 2 denies php or allowing requests out of the server to say domain abc.com and its entire IP block.
I have done so far is used apf -d abc.com to deny outgoing and incoming requests and the php pages (proxies) cannot access the site anymore).
But what i want it something hardcoded into apache itself so it blocks all php based request going off the server to that domain.
How can i go about it?
using centos5 apache 2 and cpanel!
View 2 Replies
View Related
Jun 21, 2014
I would like to deny access to .log
View 1 Replies
View Related
Mar 22, 2008
I have the following Apache redirect code in .htaccess:
RewriteRule ^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$ /domain.com/app/modules/content/latestNews.php?id=$1 [L]
This redirect works fine on Apache 2.2.8, but doesn't work on Apache 1.3.41
The following is the entry from error_log:
RewriteRule: cannot compile regular expression '^sap-latest-news/([0-9]*)/([A-Za-z0-9_-.]*).htm$'
A simple Rewrite is working fine in Apache 1.3, but the above regualar expression doesn't seem to be working on Apache 1.3. Does anyone know whether Apache 1.3 doesn't support it?
View 3 Replies
View Related
Jan 28, 2013
I have recently had number of websites that link directly to images from my website. This is not hotlinking, it is direct server request. As an example: on the linking website there is image gallery script with thumbnails and when the visitor clicks on the thumb it calls the image from my website.
I block their IP-s in .htaccess, but it is not the best way to stop them since IP change. Is there any way, similar to anti-hotlinking, to deny such direct access to my images by domain name i.e. to allow only from my website and deny from all others. Or something else that could work in my case with .htaccess.
View 8 Replies
View Related
Dec 9, 2007
I've had a localhost server setup for awhile now, and all of a sudden when I access [url]it wants to download my "index.php" file. However, when I access it via [url]is loads fine.
View 7 Replies
View Related
May 20, 2014
I have Apache 2.4.6 running without problem on Windows 7 Ultimate.
I upgraded to Apache 2.4.9 by:
Stopping Apache;
Renaming the 2.4.6 directory to "old";
Extracting the files from the zip to the Apache directory; and
Copying the old httpd.conf to the Apache directory.
After rebooting I found that I could not access localhost (or 127.0.0.1).
I then reverted to Apache 2.4.6. Localhost is now working.
View 2 Replies
View Related
Aug 23, 2007
I don't know why apache not works you can demo here : [url] Two command i've tested:
- /etc/init.d/httpd status
Quote:
Not Found
The requested URL /server-status was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an
ErrorDocument to handle the request.
_________________________________________________________________
Apache/1.3.37 Server at server.xxx.org Port 80
-/etc/init.d/httpd start
Quote:
/etc/init.d/httpd start: httpd (pid 17885) already running
How to enable apache software .
View 3 Replies
View Related
Apr 27, 2006
I'm currently trying to configure apache 2 to handle subdomains. This is on a local machine (not tied to any domain names) and I'm only doing it to research how the final structure of a site 'could' be setup.
Basically I have a single install of Apache 2 running. The outcome eventually should be to have specific sub domains that all point to the same document root as the actual domain name. So eventually I will have:
http://www.mydomain.com
http://subdomain1.mydomain.com
http://subdomain2.mydomain.com
with both subdomains showing the content at mydomain.com (there is reasoning behind this but I'm not gonna go into that).
I have apache setup as follows:
NameVirtualHost *:80
<VirtualHost *:80>
ServerName daneastley
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
</VirtualHost>
<VirtualHost *:80>
ServerName subdomain1.daneastley
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
</VirtualHost>
<VirtualHost *:80>
ServerName subdomain2.daneastley
DocumentRoot "C:/Program Files/Apache Group/Apache2/htdocs"
</VirtualHost>
Now on my local machine, only the top one works - the subdomains dont. if I add the following into my hosts file in windows, they all work:
127.0.0.1 daneastley
127.0.0.1 subdomain1.daneastley
127.0.0.1 subdomain2.daneastley
the problem being, that I wish to test this enviroment on the local network. How would I go about having every computer being able to access this? I'm assuming it comes down to DNS stuff.
View 0 Replies
View Related
Oct 10, 2013
I have a simple app where i am currently downloading some images from the internet. I want to use a local web server to host some of these images when i am not connected to the internet. I installed the apache web server and added the images folder under htdocs - my document root.
Now, i want something like when i continue to query images from www.examplesite.com/xyzimage.png within my app, it should be redirected to localhost/images. Is this possible? I tried doing this
In C:WINDOWSsystem32driversetchosts i added this line URL:...
Also in the httpd.conf i set the foll -
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?examplesite.com$ [NC]
RewriteCond %{REQUEST_URI} !^/examplesite
RewriteRule ^(.*)$ /images/$1 [L]
but it doesnt seem to work.
View 1 Replies
View Related
Aug 4, 2013
I've very slow response (from 1-2 seconds to tens of seconds) from http://localhost using Apache 2.4.3/Win32 service on Windows 8/32bit (6.2 build 9200). It doesn't depend on the browser used. Responses from all other sites are much faster.
Because it seemed to me to be a DNS issue, I tried to uncomment "127.0.0.1 localhost" and/or "::1 localhost" line in the hosts file, put "http://127.0.0.1" or "http://[::1]" instead of "http://localhost" into the browser, flushing dns by ipconfig /flushdns, stopping DNS Client by "net stop dnscache", disabling IPV6, etc. but nothing worked.
It seems that hosts file is ignored and "localhost" is passed to external DNS. Ping localhost yields to "Reply from ::1: time<1ms" response, ping 127.0.0.1 yields to expected "Reply from 127.0.0.1: bytes=32 time<1ms TTL=128" response.
Finally, "unplugging the network cable" is the only solution I've found: then the connection to localhost is much faster.
How to get instant response when connected?
View 6 Replies
View Related
Jan 10, 2009
I am currently running a dev server out of my home. The setup is as follows:
Server is Windows Server 2008.
Apache is running, listening on port 88. On this, I have subversion and TRAC.
IIS is running, listening on default port 80. On this I have an ASP.NET web site that pulls its code from subversion.
Router is a standard Linksys WRT54G.
Router is open as can be, just to test it. Server is in DMZ, all ports are forwarded to its IP (TCP and UDP), etc. This will change, but during setup state, it is what it is.
default.aspx is set up as default document in IIS. Folders are mapped correctly. The file exists in the physical directory it's looking at.
the only site and only Application pool in IIS are for the site in question.
The issue:
Both Apache and IIS work great on my local network.
Both Apache and IIS work great on wireless network.
However, in the wild, WAN works for the apache (port 88) but not IIS. Typing in http://[ip address]:88 or any of the subdirectories works fine. Typing in http://[ip address]/default.aspx returns, in Firefox, "Connection Interrupted -- the connection to the server was reset while the page was loading".
Windows firewall is disabled and unbound from all protocols. As specified, I've opened up the server and router as much as possible temporarily in order to allow me to lock it down again step by step once I have the issue solved.
View 2 Replies
View Related
Aug 14, 2008
I am doing my web like this:
1) nginx listening at port 80
2) apache listening at port 78
3) nginx throws all shtml pages to apache
they are working perfectly, except one small thing:
I don't want any public visitor may visit port 78 directly, for now, both:
[url]
[url]
are working for visitors.
Anybody knows how to block/hide port 78 to the public access?
my nginx config snippet:
Code:
location = /index.shtml {
proxy_pass [url]
}
my apache2 config snippet:
Code:
Listen 78
If I make apache as follows:
Code:
Listen 127.0.0.1:78
I will get 502 bad gateway when I visit:
[url]
View 1 Replies
View Related
May 12, 2014
I am trying to make Apache SSL work on my SAP BO Environment. I have implemented SSL parameters and conf and now when i access:
http://localhost:<portno>/index.html - It Works !!
https://localhost:<sslPortNo>/index.html - It Works !!
BUT, when i try to login to
http://localhost:<portno>/BOE/BI -- It works !!
https://localhost:<sslPortNo>/BOE/BI -- It DOES NOT work.
View 3 Replies
View Related
Mar 12, 2013
I need to modify a web that is working in the server. I'd like to download it to my computer and test it. For this reason I have to change the htaccess file to change the redirects, but it doesn't work, appears 404 error
This is the code.
RewriteEngine On #rewritecond %{http_host}
^camps.es [nc] rewritecond %{http_host}
^camps [nc] #rewriterule
^(.*)$ http://www.camps.es/$1 [r=301,nc] rewriterule
^(.*)$ http://localhost:8887/camps/$1 [r=301,nc]
View 3 Replies
View Related
Aug 4, 2013
I have a home server set up with a couple of things going. Here is the weird thing that I can't figure out. I can access everything just fine from an INTERNET connection external to my LAN using my domain name, let's say "domain.com". So, if I type into my computer on my LAN www.domain.com, it searches without actually finding it's destination giving up after a period of time saying the server cannot be found.
But, if I type www.domain.com on my mobile phone using my data connection, it connects without a hitch and everything functions fine. I have done this set up before at a different home, but since I moved, I have come across this problem and either don't remember having this happen before or don't remember what I did to resolve it. What I should look for?
View 5 Replies
View Related
Mar 12, 2015
my local host is just taking incredibly long to load. At work I've set it up no differently and it works like a charm, but at home, it works.. But at times it doesnt load instantly until I restart my browser. I have to press refresh or enter to login a million times for it to load after the first few seconds I use it.
View 1 Replies
View Related
Oct 3, 2013
I found a socket available other than 80 which would not allow me to use. I set it in the conf file as 1800 and then go to apache/bin directory and load httpd.exe. When I go to the browser, I have to type in http://localhost:1800 for it to work once. If I close the browser and try again, or I try a php file, it says it can't find localhost. I have to stop httpd.exe and reload, then it will work once.
Do I have to find a way to use socket 80 for it to work?
View 2 Replies
View Related
Oct 30, 2008
I'm on windows vista. I've got an SDSL line into the house with a dedicated IP 62.etc. I've then got a Prestige 791R and all PC's plugged in to that. I've also got a wireless router for my Wii set up.
Basically I've set up this DHCP thingy to start at 192.etc.3 and the Wireless router is at 192.etc.1 and the Prestige is at 192.etc.2 my pc is at 192.etc.9
This is about where my knowledge stops unfortunately.
I have installed apache as the most basic default install I think you can and it seems to be working absolutely fine. I'm assuming I could also install PHP and MySQL etc and wouldn't have too much of a problem, however, my friend cannot seem to access the environment from the WAN IP and when I type in my WAN IP I get the prestige router's control panel.
I read somewhere that I needed to forward port 80, now I can 'open' ports in the prestige control panel but I did try opening port 80 in the control panel and pointing it to my LAN IP (92.etc.9) but it didn't seem to work.
I'm at a bit of a loss so if anyone could point me in the right direction I would be most grateful, just to clarify:
//localhost loads the html file 100%
//192.etc.9 loads the html file 100%
//62.WANIP internally loads my prestige routers control panel
//62.WANIP externally does not load a page (cannot be found)
If you need any more info just let me know and I'll get it.
View 0 Replies
View Related