Not able to access my web application outside the server (apache) - apache

I have setup a mapping application on a Windows 2012 server, with apache web server. The application is accessible using this URL within that server. But not able access outside the server.
I have given the IP in apache .conf file for the "listen" parameter. Hope that is fine.
The IP is pinging is pinging from the local machine.
The hosting support confirmed there is no firewall blocking the access.
What else should I do to correct this?

The IP address, is it static?, and are your cgi settings configured properly and the permissions on your directories within the website?
Are you receiving any forbidden access or other related errors?
Your Apache httpd.conf, your php.ini, and your user.conf files should all be checked along with configuring the correct permissions on files and directories.
*Note: Edit config files with sudo, restart apache after making changes.

Related

Browser cache redirecting me to different website

I have two Wordpress websites hosted on two different servers and wish to consolidate these to be hosted on one server.
I've successfully transferred the database and website files over and setup the new virtual host in Apache.
Before switching the DNS over to the new server, I like to confirm it is working by altering my hosts file (I'm on Windows) to point to the new server:
xxx.xxx.xxx.xxx example.co.nz
I can verify this by running ping example.co.nz and see that it is correctly pinging the IP address specified in the hosts file.
The strange thing, though, is that when I go to example.co.nz in my browser, I am redirected and served the other website that was originally on this server; othersite.co.nz.
But if I open my Chrome Dev Tools, which has the cache disabled, then I am served the correct site.
Is this just a local caching issue or will other users trying to access the site be affected by this? Is there a way I can verify this, perhaps externally?

Use Apache virtual hosts to access local servers?

I was wondering if it's possible to use Apache to request websites on a local network, with apache being the gateway so to speak? On my home network I currently have a Windows box running an ASP.NET site, it has to run under Windows/IIS, a server I'm not particularly fond of, but I can live with it... Alongside this I'm thinking about running an Apache server on a separate machine, for my PHP applications, as well as some other applications (e.g. Plex).o
Ideally I'd like to have Apache on port 80, listening for requests, and using the sort of functionality I have with a virtual hosts file to load content from another webserver on my network, that isn't directly accessible through it's own port. I know I could just run PHP under IIS, or move one server to another port, but there's no fun in that!

How to set a custom website name instead of ip address for local computer?

I can point a url to a directory in my computer by setting /etc/host and /private/etc/apache2/extra/httpd-vhosts.conf files. For instance, when i type sample-app.com in my computer, website under /Users/azad/works/sample-app.com folder is running.
When someone type sample-app.com in another computer in same local network i want to display the same website located on my computer. Is this possible?
By the way, i don't have access to any computer in the local network and i can't do any configuration.
Mac 10.7.5 (I am using mac but if windows is better for this purpose i can use windows too),
PHP 5.3,
Apache 2.2
If you want to accomplish this on windows, use the hosts file on the computers you want to point at that sample-app.com URL mapping your IP address to that URL in all the computers you want that to work on. Then make sure your HTTP server is configured to serve that website under that host name for port 80.
Since you aren't able to configure the local network, the best way to handle this situation is to configure a host name with the website domain's DNS server, such as dev.sample-app.com, which points to the local IP address (seeing as how its on the local network) of the computer hosting the website. This will then allow other computers on the local network to enter this host name to access the webiste.
If you had control of the local network's DNS server or control of the proxy (if they have a proxy), there would, of course, be other options.
Update:
Since you mentioned in your comment that you have control over the DNS server, here is how you could accomplish your goal via the DNS server. First, add a forward lookup zone for sample-app.com to the DNS server. Second, configure the default host for the zone to point to the computer serving up the website content. Now the client computers will resolve the local IP when the user enters sample-app.com into their web browsers. If you need to continue to have access to other hosts on sample-app.com, you might want to try asking about it on serverfault.

How to configure apache to proxy requests

I want to add a javascript based chat system to my web app. I have read in many places that apache needs to forward(proxy) the requests to the xmpp chat server.
From what I have understood , I either need to add proxying support to apache server
OR use the jabberHTTPbind servelet.
I am trying the first thing. Add proxy support to apache. Now within Eclipse I am using Tomcat 7.0. I think this Tomcat comes with its own web server and is not using Apache. Is that true ?I am using Tomcat from http://tomcat.apache.org/download-70.cgi and added server in Eclipse by providing its extracted path.
I am not able to find any apache related folder structure eg(/etc/apache2/apache2.conf) within my Tomcat extracted directory.Also can't find httpd.conf anywhere .
Should I need to download apache separately and connect my tomcat to it.
I think adding proxy support to apache is required because javascript code won't be able to connect to any URL other than the current domain. so the question again is the same , where are all these apache2.conf and httpd.conf to add mod_proxy. and where can I do the virtual host mapping.
Any help to move ahead with be very much appreciated.
You need to install the Apache HTTPD server and enable reverse proxying. Read the doc on mod_proxy on how to do this. There are tons of resources on Stackoverflow as well; search for Apache reverse Proxy. The conf files you mention are part of the Apache HTTPD install.
javascript code won't be able to connect to any URL other than the current domain
That is generally true unless you enable CORS

Dedicated User for Weblogic - apache won't run

I have a java application running on Weblogic on a Linux box. The application/weblogic are run as root. I see this as a security risk. I want to create a dedicated user to run the application.
To do this I have:
Created a new dedicated DNRS/Weblogic user called 'wluser'.
Granted access to my application to only the dedicated user wluser.
The application is hosted on Apache. To run the application, I first start apache, then weblogic.
When I tried to run apache, it complained 'Permission denied: make_sock: could not bind to port 446'.
It seems apache needs to be started as root. But if I changed the owner of apache to root, I'll be able to run the application as root. Exactly what I don't want..
Anyone any ideas?
I'm fairly sure that an application has to be given permission to use a port below 1024.
Check out this question on ServerFault: Regular User socket permissions