Forums | Mahara Community

Support /
DNS entry for mahara


Derrick Ward's profile picture
Posts: 13

18 April 2018, 11:12

Hello

I have built a ubuntu 16.04 server running mahara.  The installation is all good and mahara is working with ldap authentication.
I am in the process of getting the dns entry correct.
 
We have the following issue.
To access mahara you need to go to  http://<ipaddress>/mahara/htdocs/
The dns entry has been made to http://<ipaddress>
BUT 
We are unable to make the dns entry to  http://<ipaddress>/mahara/htdocs/
I get the following when I attach to the server;
?ui=2&ik=29708f0bd3&view=fimg&th=162d0edeb8f5185b&attid=0.1&disp=emb&realattid=ii_jg2wr4d90_162d0ed04bd6ee57&attbid=ANGjdJ9ctrhiMcrf7iLMkj34ldhx077lLG0mB7mYUxR0jOKBi6D7eQA9sOkMXfxlcCUr4suLiE2BNmL6RvWhCHteQhn2YRwlp8kH3RNCYce7Qiw-LgiiUX30AjomIkI&sz=w1124-h732&ats=1523934809799&rm=162d0edeb8f5185b&zw&atsh=1

Is anybody able to advise how I get the dns entry correct to point to  http://<ipaddress>/mahara/htdocs/
 
many thanks
 
Derrick
Derrick Ward's profile picture
Posts: 13

18 April 2018, 16:18

Hello

I have been able to work out that I need to edit the following;

config.php

and

wwwroot value is cached in the config table in the database

I have been able to edit the config.php to - $cfg->wwwroot = 'https://mahara.<removed>.nsw.edu.au';

this reflects my dns entry of mahara.<removed>.nsw.edu.au

 

Can anyone advise where I can find the - config table in the database - as I am not sure where the file / database file is located for me to edit.

 

Derrick

Robert Lyon's profile picture
Posts: 757

18 April 2018, 16:54

Hi Derrick,

If you are setting $cfg->wwwroot in your config.php file then you will need to delete the line from the config table in db

To do this run these commands:

SELECT * FROM config WHERE field = 'wwwroot';

make sure the row is the one you want to delete then

DELETE FROM config WHERE field = 'wwwroot';

Cheers

Robert

Kristina Hoeppner's profile picture
Posts: 4729

18 April 2018, 16:57

Hi David,

Great that you got a step further. Good to see also that you are going with an SSL certificate to protect the site more.

If you use Postgres, you could run the following command in the terminal (substitute "mahara-database" with the name of your own Mahara database)

$ sudo -u postgres psql mahara-database
delete from config where field = 'wwwroot';

If you don't manage your database via the command line, open your database management tool, find the database for your Mahara site and in there the table "config". Open that table and remove the value that is in the row for "wwwroot".

Cheers

Kristina

 

 

Derrick Ward's profile picture
Posts: 13

18 April 2018, 18:26

thank you for the quick reply.

I have used a database mgt tool (Emma) to remove the value that is in the row for "wwwroot".

I now have the following in config.php - $cfg->wwwroot = 'https://mahara.<removed>.nsw.edu.au';

 

I still seem to have an issue with accessing mahara.

When I browse to https://mahara.<removed>.nsw.edu.au - I get site can't be reached

When I browse to <server IP>/mahara/htdocs/ - I get https://mahara.<removed>.nsw.edu.au/mahara/htdocs/ and the site can't be reached

 

I have asked my network administrator and he states that the dns entries are all correct.

 

Is there something that I have missed ?

 

Derrick

 

 

Kristina Hoeppner's profile picture
Posts: 4729

20 April 2018, 16:47

Hi Derrick,

Sorry about the earlier name confusion on my end.

Can you please check your Apache settings and that you have the correct server name in there and also the SSL setup? I usually only set up local sites (not a developer here ;-) ) and if I want to use SSL, I need to follow the instructions at https://wiki.mahara.org/index.php/Developer_Area/Developer_Environment#Set_up_site_for_local_https:.2F.2F and make sure to include the SSL VirtualHost info (it's under step 3).

If you do need to make any changes, please do:

sudo service apache2 restart
sudo apache2ctl configtest

and see if that helps any.

Cheers

Kristina

 

6 results