Illustration of connected portfolio elements

Portfolios for your
learning community

Try out Mahara

Create portfolios

Using Mahara, students and staff create their personal learning stories by uploading evidence of activities they have participated in, and embedding publicly accessible content they have previously put online. They can write reflections on their experiences that frame this evidence, map it to competencies or registration requirements, and provide necessary context.

Mahara can be used for many different portfolio purposes, such as study, professional development, work-integrated learning, assessment, showcase and presentation, and employability.

Learn about the portfolio options

Illustration of a person with their portfolio
Illustration of a paper airplane representing sharing

Share work

Mahara allows portfolios to be shared flexibly with one person, a specific group of people, or the entire world. Access can be further restricted to a particular time frame or just within an assessment task.

Find out about sharing portfolios

Engage with others

Mahara makes it easy to comment and give feedback. Portfolios can also be submitted to learning management systems via LTI (Learning Tools Interoperability) for marking.

Groups in Mahara allow people to create portfolios collaboratively and engage in forum discussions.

Learn about collaborating in Mahara

Illustration of a group of people collaborating
Illustration of a podcast logo

Listen to portfolio stories

In our podcast 'Create. Share. Engage.' portfolio practitioners, researchers, learning designers, and portfolio authors share their journey. Learn how they navigate the many different facets of portfolios in general, and Mahara specifically.

Listen on the podcast website or in your favourite app

Mahara Community

Clean URL

na li's profile picture
na li
Posts: 61
09 November 2015, 21:05

Dear Mahara contributor,

I really appreciate your great contributions on Mahara. Our University is using Mahara and I'm following configuration of the clean URL according to mahara wiki.

I successfully configured the clean URL on our test server, it works well. But when I set the same settings on our production server, it doesn't work.

The version of apache on our test server is :Apache/2.4.6 (CentOS),CentOS Linux release 7.0.1406 (Core)

The version of apache on our production server is :Server version: Apache/2.2.15 (Unix), CentOS release 6.7 (Final)

The rewrite rule I've added to the httpd.conf file is as following, these rewrite rules do work on test server but not work on production server:

RewriteRule ^/user/([a-z0-9-]+)/?$ /user/view.php?profile=$1&%{QUERY_STRING} [NC]

RewriteRule ^/user/([a-z0-9-]+)/([a-z0-9-]+)/?$ /view/view.php?profile=$1&page=$2&%{QUERY_STRING} [NC]

RewriteRule ^/group/([a-z0-9-]+)/?$ /group/view.php?homepage=$1&%{QUERY_STRING} [NC]

RewriteRule ^/group/([a-z0-9-]+)/([a-z0-9-]+)/?$ /view/view.php?homepage=$1&page=$2&%{QUERY_STRING} [NC]

Could anyone help with this?

Thanks a lot.

Best wishes,

Lina

Aaron Wells's profile picture
Aaron Wells
Posts: 896
10 November 2015, 14:38

Re: Clean URL

Hi Lina,

In general, you should always try to get your test environment to be identical to your production environment. Same operating system, same web browser, same versions, etc. There are quite a few differences between Apache 2.2 and Apache 2.4. :)

I don't see anything obviously incorrect here. Although, the "[NC]" flags should not be necessary and may be causing problems.

Can you be more specific about what's going wrong? Are there error messages when you try to start Apache, or is it sending you to the wrong page when you try to access a user's pages?

Cheers,

Aaron

na li's profile picture
na li
Posts: 61
10 November 2015, 21:20

Re: Clean URL

Dear Aaron,

Thanks for your reply.

I tried to explain more details but I do not have permission to post links. Even the screenshots with links are not allowed to post. It's a little hard for me to explain the situation. I have an error message for both the test server and production server:

Starting httpd: httpd: apr_sockaddr_info_get() failed for lnx-mahara.xjtlu.edu.cn
httpd: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

Following is the error message I've got when I try to go to user's profile page with the clean url:

Not Found

The requested URL /user/na-li was not found on this server.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


Apache/2.2.15 (CentOS) Server at mahara.xjtlu.edu.cn Port 443

 

Thanks a lot.

Best wishes,

Lina

Kristina Hoeppner's profile picture
Kristina Hoeppner
Posts: 5141
13 November 2015, 3:17

Re: Clean URL

Hello Lina,

You can now post links. Your account was on probation, but since you've had some interaction with an existing member of the community, the probation has been lifted.

Great to read that your instance works now.

Cheers

Kristina

 

na li's profile picture
na li
Posts: 61
13 November 2015, 19:29

Re: Clean URL

Dear Kristina,

Thanks a lot for your support. I really think Mahara is a powerful platform and this forum is great. I've got very friendly and efficient help.

Best wishes,

Lina

Kristina Hoeppner's profile picture
Kristina Hoeppner
Posts: 5141
02 December 2015, 8:27

Re: Clean URL

Hello Lina,

Thank you for your feedback. It's good to hear that the help provided is useful to you.

Cheers

Kristina

 

na li's profile picture
na li
Posts: 61
11 November 2015, 20:08

Re: Clean URL

Dear Aaron,

I think I found the reason but still cannot fix.

Our production server is using https, but test server is not. If I manually remove 's' from https, the rewrite rule can work. But considering the information security, we have to use https. How can I use https and make the clean URL available at the same time?

Could you please help?

Thanks a lot.

Best wishes,

Lina

Kevin Rickis's profile picture
Kevin Rickis
Posts: 67
12 November 2015, 0:32

Re: Clean URL

Hi Lina.

I have my rewrite rules in .htaccess rather than in httpd.conf this is what works for me with https.

 <IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://yoursite.com/$1 [R=301,L]
RewriteRule ^user/([a-z0-9-]+)/?$ /user/view.php?profile=$1&%{QUERY_STRING}
RewriteRule ^user/([a-z0-9-]+)/([a-z0-9-]+)/?$ /view/view.php?profile=$1&page=$2&%{QUERY_STRING}
RewriteRule ^group/([a-z0-9-]+)/?$ /group/view.php?homepage=$1&%{QUERY_STRING}
RewriteRule ^group/([a-z0-9-]+)/([a-z0-9-]+)/?$ /view/view.php?homepage=$1&page=$2&%{QUERY_STRING}
</IfModule>


Hope this helps.

Kevin
na li's profile picture
na li
Posts: 61
12 November 2015, 1:18

Re: Clean URL

Dear Kevin,

Thanks a lot for your help.

Since I'm not using a virtual host, so I think I can only add the rewrite rules to httpd.conf file. I've added the RewriteRule that you shared with me. But when I try to rewrite to /user/name, it still showed the 404 not found message. When I removed the 's' manually from 'https', the rewrite can work then.

There's a setting on mahara's administration page, I've selected use https. Did you do the same when you installed https for your mahara server?

Thanks.

Best wishes,

Lina

Kevin Rickis's profile picture
Kevin Rickis
Posts: 67
12 November 2015, 2:10

Re: Clean URL

Hi Lina,

as it's not working anyway you could try the .htaccess, just delete the file if it makes no difference or breaks stuff. 

I assume you have  $cfg->wwwroot in config.php set to https://yoursitename.dot

Good luck,

Kevin