Adding a Banner/Message to all Pages on Web Server - windows

I have two web servers, Windows machines running Apache.
One is a backup of the other, so if one fails the other can be used instead.
Does anyone know if it's possible to configure Apache so it displays a small banner/message on each page it serves to say that the user is running on the backup server?
I did find a 3rd party module (mod-substitute-append http://code.google.com/p/mod-substitute-append/) that may have done what I wanted, but there appears to be no documentation for it, and when downloaded looks like it was written to be installed on a Linux machine.
Does anyone have any ideas I can try?

Apache 2.2 ships with mod_substitute: http://httpd.apache.org/docs/2.2/mod/mod_substitute.html
Apache 2.4 ships with mod_sed: http://httpd.apache.org/docs/trunk/new_features_2_4.html
From the documentation, mod_sed does similar things to mod_substitute_append (which I have used, on Linux). It might be worth grabbing an Apache 2.4 Windows binary and seeing how you get on.

Related

How to install Coldfusion on Mac OS X 10.15 Catalina using external virtual host

I've been here before and even wrote an article on how I was able to connect Coldfusion 2018 with Mac OS X Mojave, but since the upgrade to Mac OS X 10.15 Catalina, I haven't been able to get Coldfusion to work correctly on virtual hosts (ie. http://local.mylocalsite.com).
Goal: install Apache connector for Coldfusion so that I can run my dev site from within the /Sites folder like I would any other site.
Problem: Apache is working and I can access websites from the /Sites folder using the virtual host (ie. local.mydevsite.com), but although Coldfusion is running (I can access the Coldfusion Administrator), my computer does not seem to recognize that Coldfusion is supposed to run. I don't know if this is Apache or Coldfusion's responsibility.
What I've tried: I've tried using the GUI connector, as well as trying to confirm the settings via command line. I have XAMPP installed, which I believe that DesktopServer (an application by ServerPress) is relying on, but that's probably not relevant; but what I'm getting at is that I believe XAMPP relies on Mac's default installation of Apache.
I've also tried to go into every file that is referenced in any instruction document to determine if there is anything out of place. Part of my confusion is that there are many instances of some of these files and I'm not sure which one is active. Here are some of the files I've looked into:
/Applications/XAMPP/xamppfiles/etc/extra/httpd-vhosts.conf
/Applications/XAMPP/xamppfiles/apache2/conf/httpd.conf
/Applications/XAMPP/xamppfiles/apache2/conf/mod_jk.so
/private/etc/apache2/httpd.conf
/private/etc/apache2/mod_jk.conf
/private/etc/apache2/extra/httpd-vhosts.conf
From what I can tell, the main settings for Apache are stored in the /private/etc/apache2 folder, but I want the XAMPP version of https-vhosts.conf because that's where DesktopServer is pulling their virtual hosts from. Regardless, I don't think it matters which vhosts file is being used because Coldfusion won't run on any of the local sites from my /Sites folder that are loading correctly when I visit local.anylocaldevsite.com.
Thoughts? This is either a really dumb question because no one else is asking it, or there aren't many Mac users who also use Coldfusion. Would love assistance if anyone has a clue. Thanks!
Update: This isn't an exact answer, but the recommendation to try CommandBox was a win. I installed CommandBox and then ran the "ColdBox" application in the root of my project and the site opened up in my browser like a gem. Wonderful. Thank you! I can call that the "answer" if no one objects, but I know that it's more of a workaround than an exact fix.

CouchDB can't set up HTTPS

I am learning to work with CouchDB and I am usually making Ajax calls in order to communicate with my database. I started getting '
Cross-Origin Request blocked
' and as the reason
Access-Control-Allow-Origin
, so I decided to work with CouchDB through HTTPS and not the standard HTTP. For that, I have followed the instructions given on Link to manual.
Problem on Linux:
I first tried to set it up on my laptop where I use Linux. But I couldn't find the Local.ini file where I was supposed to set the paths to the certificates.
After unsuccessfully trying to find a solution for it, I gave up and started from the beginning on my computer, where I use Windows.
Problem on Windows:
So I installed the newest version of CouchDB on my Windows, I have created the certificates, found the Local.ini file, did everything as it is explained in the manual. The problem was that I couldn't restart CouchDB so that the changes would take place. So, after google-ing the problem, I found a possible solution, to stop CouchDB through the Task Manager->Services-> Stop Apache CouchDB. But when I tried to Start it again I get the problem
Windows could not start the Apache CouchDB on Local Computer. For more information, review the System Event Log. If this is a non-Microsoft service, contact the service vendor, and refer to service-specification error code 3.
I would be very happy if someone could help me with my problem(s). I prefer getting a solution for the Linux problem since I work mostly on my laptop, but I will be satisfied if I get it going even on Windows.
Thanks in advance
On Linux, you can add CORS to CouchDB with this package:
https://github.com/pouchdb/add-cors-to-couchdb

Apache install on Windows, cannot find installer

I'm trying for a couple of hours to find a MSI or EXE install package for Apache in Windows, and simply could not find it anywhere. All i get is a zip file with the directory structure, but when i extract it obviously the service is not installed / configured.
Can someone please point me to a place where i can find a MSI installer pro Win 2008 / 64bit ?
Thanks in advance.
This is why there are several packages including WAMP, XAMPP etc because it must be compiled and Apache will not provide binaries.
The Apache HTTP Server Project itself does not provide binary releases
of software, only source code.
A quick search would reveal some sources where you can download load them. I suggest to go with one of these to make maintaining it easier for yourself.
http://httpd.apache.org/docs/current/platform/windows.html#down
Here are some suggestions as noted in the docs.
ApacheHaus
Apache Lounge
BitNami WAMP Stack
WampServer
XAMPP
Edit:
I do not know specifically where you can get 2.4 msi and there may not be but 2.2 is still available if you have to have an installer. Which is still the most used version. Which is what I run on all my servers. Get 2.2.25
https://archive.apache.org/dist/httpd/binaries/win32/
If you want 2.4 for windows which is NEWER that is the correct package from Apache Lounge you don't need an installer. The package give you the exact layout for the web sever. You're looking for a pretty little msi that goes through a wizard like WAMP, you're not going to find that. Installing from that zip you downloaded is easy and only takes like 5 minutes to setup. You can also put httpd.exe in the windows startup to so that it starts when it boots. Watch this video, it walks your through setting 2.4 up.
http://www.lynda.com/Apache-HTTP-Server-tutorials/Installing-Apache-HTTP-Server-24-Windows-New/77958/150487-4.html

Getting cf10 to work with Apache on Mavericks

We've installed cf10 on a Mac with Mavericks.
All seemed to go well. We didn't get any errors.
Apache is running fine. We've setup a virtual host, and it is serving html files fine.
Coldfusion Administrator is running fine at 127.0.0.1:8050
Yes, we did select Apache when installing CF (pointing config to /public/etc/apache2/).
But when we run a .cfm page from the virtual host on Apache, it just renders the contents of the .cfm page to the browser as text (e.g. just get's render as text).
We have read and worked through the myriad of blog posts on how to get CF10 working on Mavericks, but with no luck, and we are starting to wonder that this may not be the problem.. as neither cf10, nor apache are 'broken' as such. It just seems that apache is not passing .cfm file to cf for processing.
Can anyone suggest something we may be missing?
Many Thanks
This is because the connector is broken currently. I recently moved to mac so I encountered the same issue. This article provides a working solution. It looks like a lot but it doesn't take long if you take time to read through it.
http://www.cfdad.com/2013/10/27/how-to-compile-adobe-coldfusion-10-apache-connector-for-osx-mavericks-10-9/
EDIT: Sorry I should provide the source for the bug: https://bugbase.adobe.com/index.cfm?event=bug&id=3653076
It might be a simple as running the web server connection utility. That's all I had to do with OSX 10.8. Brian blogged that this was all he had to do.
http://brianflove.com/2013/10/23/os-x-mavericks-and-apache/
You just have to tell it where the /conf/ folder is now located. We both used /private/etc/apache2/, not /public/.

What's the best way to develop against WordPress on Windows when you already have IIS/SQL Server installed?

If you want to develop against WordPress (i.e., have a local instance running on your machine so you can develop themes, get blogs and sites laid out, etc.) and you're running Windows on your development machine with IIS and SQL Server already installed, what's the best way to do it?
I found a method online which sets up a little "mini" server on Windows running instances of Apache and MySQL but they didn't advise using it on a machine with IIS already installed. Obviously one could install Apache and MySQL and do it that way but given what Windows affords you (i.e., methods of running PHP in IIS - I think Windows Server 2008 is even optimized for this), is that the best way? Are there ways to run WordPress with SQL Server as the backend? (I wouldn't think so but I thought I'd throw that out there).
And are there methods differing on the version of Windows (i.e., XP, Vista, Vista64)
I run XAMPP on a thumbdrive and install WordPress (usually multiple instances of it) on there. Then I start up XAMPP when I'm going to work on Wordpress development.
EDIT: this setup does require that IIS be stopped when the XAMPP server is running (or some byzantine configuration magic that I've never bothered to figure out. Since most of my personal needs for local IIS development are handled by the Visual Studio built-in instance of IIS, which can run side-by-side with XAMPP, I rarely have bother with anything else, but that probably won't work for everyone.
Install PHP, run Wordpress in IIS. Install MySQL which can be run side-by-side with MSSQL. The only thing you'll miss using IIS over Apache is mod_rewrite for prettier URLs.
Avoid running IIS and Apache on the same machine if at all possible. IIS likes to bind to all available IPs blocking Apache from binding to an IP, which you can get around if necessary, but it's not immediately clear what's happening.
I've been running this setup for years.
Since you are interested in developing for Wordpress I strongly suggest you use the most common WP setup: Apache, PHP and MySQL.
You can run Apache and IIS at the same time (I have IIS listening on port 81 and Apache on 80) or you can run only one at a time (create 2 bat files to start/stop the servers using the net start/stop command).
You can use IIS, PHP, MySQL to run Wordpress but there are some subtle differences that can drive you crazy or cause problems when you deploy on Apache.
You can certainly run IIS and Apache on the same box. We do it currently with Documentum/Apache and IIS on the same server. Just pick a range of addresses for one web server - 808x for Apache for example.
You should also consider using Thinstall from VMWare where you can virutalize an entire application - registry, .Net and all - distribute as a single .EXE. We do this now for packaging applications that don't play well together. You might want to virtualize Wordpress/Appache/MySql and set an IP (808x) for that configuration. This way you can move this to any server with IIS and it'll play well with different configurations.

Resources