Resolving a sub directory to a Heroku app via .htaccess? - apache

I use a Media Temple Grid Service solution for hosting. I currently have a Heroku app which I serve via blog.domain.com using a CNAME record.
I'm trying to have the sub-directory domain.com/blog resolve to the Heroku app instead. I don't want the header to change, so I'm not looking for a redirect I believe.
I've attempted a couple of snippets for .htaccess files which have not worked for me. Can anyone recommend some tips to have this work?
It seems a proxy pass would work from the research I've done, but I can't figure out where or how to set it up given my GS folder structure.
Any help is much appreciated. Thanks in advance.

Related

MediaWiki on Subdomain (.htaccess rewrite)

I am using an Apache Server (cant config apache root files) and running my core website (Invision Power) in the root domain "example.com". We decided to expand our services with a wiki using MediaWiki which is installed and can currently be reached on "example.com/w/".
I am utterly noobish with .htacess and Rewrite Conds/Rules and looking for help! We want our wiki to be access via wiki.example.com - and this URL should NOT change in the adressbar. Each page (wiki.example.com/Main_Page) should be accessed like this.
Please keep in mind that we want our core website keep working as it did for years now. So example.com and any other folders should not be affected by the Rewrite Rule.
Can someone please help - do you need any further information??
THANK YOU SO MUCH
Best Regards

Yii app on Amazon EC2 how to make it work?

I would like to deploy a Yii app to Amazon EC2.
I've installed httpd, mysql, php and all the necessary modules.
The app was running fine on my wampserver localhost.
I've transferred everything (DB, app folder) but I'm having issues with accessing the site. I see default apache site, and I see directory structure under var/www/html/app folder, and var/www/html/app/web gives a blank page (or Internal Server Error). I have a .htaccess file in var/www/html/app/web. I was searching a lot, and have found informations about allowoverride, virtual hosts (I have only IP, what is server name then? the IP?), etc, and have tried a few different things, but I don't want to mess it completely up, and I'm pretty sure it must be some very simple adjustments to make it work, but I don't know what (maybe some settings with EC2 like elastic IP? I dont yet have that one but I'm not sure I need it). I don't have much experience, can you please point me to the right direction what else I have to set in order to make it work? Thank you very much!
UPDATE: I have set Elastic IP up and registered a domain.
I have simply chosed another image, and without any special actions it works. The first was an Amazon Image, now it's an Ubuntu.

Why is my favicon appearing on Amazon S3 endpoint but not on the forwarded domain?

I have tried everything possible and am out of ideas as to why my favicon is still not appearing. If I told you how much time I've spent trying to figure this out you'd understand why i'm on the verge of losing my mind.
Here's the rundown [i'm not technical- just starting to learn so please bear with me]:
I'm using Amazon S3 as my host. GoDaddy is the DNS and I have forwarding with a mask setup so that the amazon endpoint is directed to the actual domain.
Here's the strange thing-- the favicon appears on the amazon endpoint but doesn't on the forwarded domain which is where I want it to appear. The favicon also appears when I do some testing using Dreamweaver.
I can assure you that it isn't a matter a clearing the cache as I've done that numerous times and have ran tests to make sure that it's working. I've tried all the possible different types of variations of code and nothing works. I'm led to believe that it's not an issue with the code, cache, file but rather something else that is out of my realm of knowledge.
So I come to Stackoverflow.
Please-- any help will be GREATLY appreciated!
For anyone having such problem - making the favicon public and using a direct link found in the file's properties on s3 did the charm.
That means use a full URL that is always going to work from everywhere. Depending on how things are set-up a hostname could resolve to something like localhost on multiple machines, so you want to make sure that the host name you're using always has the resource at that location. CORS should have anything to do with it as it is a standard full GET request.

What is the differences between redirecting url using `httpd.conf` vs `.htaccess`?

I google on the net and found two approaches to redirect incoming requests to apache in Ubuntu OS: 1) using httpd.conf and 2) using .htaccess.
I am confused. What are the differences between them?
Please share if you know how.
Thank you!
The .htaccess-file is meant to be used on shared servers where you don't have access to the primary Apache config files. It is generally a better idea to use httpd.conf or your site config rather than .htaccess if you can as this has a lower processing overhead (as far as I know, the .htaccess-file is parsed on each request), but both ways work fine.

Movable Type Administration to https subdomain

I have working https protocol on my subdomain. I would like to change current url:
http://www.mydomain.com/cgi-bin/mt/mt.cgi
to
https://ssl.mydomain.com/
How can I do it? Could anybody help me step by step? I am beginner in this field. I tried Google and also Movable Type forum, but no answer so far. Maybe this could help you http://www.movabletype.org/documentation/appendices/config-directives/admincgipath.html. Thank you for your help, I really appreciate it.
Thomas
The AdminCGIPath config directive is exactly what you need to apply.
Assuming that you have already set up SSL with your hosting provider and placed your MT application files in the correct web root for the SSL domain (which can be the same domain as your main site), here are the steps to change the MT admin path to use the SSL
Open the mt-config.cgi file.
Add the following line:
AdminCGIPath https://ssl.mydomain.com/cgi-bin/mt/mt.cgi
Save the mt-config.cgi file.
At this point you should be able to access MT via SSL by going to: https://ssl.mydomain.com/cgi-bin/mt/mt.cgi
Rather than access MT at the root of this domain--which I don't suggest because you may want to host other SSL apps--I suggest that you place a redirect script in your index file.
You can do this with Meta Refresh Tag or html meta refresh
That should answer your question.