Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

So I have new MediaWiki instance install on a brand new Amazon EC2 instances. All is going swimmingly, until I have to log in via the web browser to configure it. Since I'm running on a hosted server, I can't hit http://localhost/mediawiki/config/index.php like the instructions say to.

If I try to hit it via http://<My IP address>/mediawiki/config/index.php, my browser just tries to download the file because anonymous browsing isn't enabled. I seem to be before LocalSettings.php is created, so I don't know how to move forward from here.

share|improve this question
add comment

2 Answers 2

up vote 3 down vote accepted
+50

Actually there is a splendid generic way of accessing remote resources as if they were local.

ssh -L 8080:localhost:80 username@EC2machine

this will tunnel the port 80 (the http protocol) , on your EC2 instance to your own computers loopback interface on the port 8080

Simply typing http://localhost:8080 on your computers web browser will redirect the request to your EC2 instance through the created SSH tunnel

the reason i choose 8080 instead of 80 for the loopback interface port, is that ports below 1024 are privileged and require sudo to be used.

share|improve this answer
add comment

Note that there is a juju charm for mediawiki, though it is meant for higher scale installations which would have multiple web-heads and dedicated instances for MySQL, memcached, etc. To use it you can install and setup juju (see https://juju.ubuntu.com/docs/) and then type

 juju bootstrap
 juju deploy mediawiki mywiki
 juju deploy mysql wiki-db
 juju add-relation wiki-db mywiki
 juju expose mywiki

This will run three EC2 instances (1 juju server, 1 mediawiki, 1 mysql). You can run it on one as well if you add 'placement: local' to your environments.yaml, but that is an undocumented hack that may be removed.

This should result in a running, working mediawiki at the address of the mediawiki server (visible by typing juju status mywiki). If you also add memcached, it will scale out pretty heavily with juju add-unit mywiki.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.