Am Montag, 25. Dezember 2017 10:26:40 UTC+1 schrieb Michael Schmid:
>
> Hi all
>
> I know that this topic was several times mentioned bevor.
>
> I have read all the information I could found about it.
> But I can not solve my problem.
>
> I would like to recode a cgi-app to mojolicious. But I have only a shared
> webspace
> to do it. If I login into my shared webspace with ssh and I enter
>
>
> *mojo version*
> I can see the following information:
>
>
>
>
>
>
>
>
>
>
>
> *core perl v5.24.3, freebsd Mojolicious 7.58, DoughnutOptional EV
> 4.0+ / 4.22 IO::Socket::Socks 0.64+ / n.a. IO::Socket::SSL 1.94+
> / 2.051 Net::DNS::Native 0.15+ / n/a Role::Tiny 2.000001+ /
> 2.000006*
>
>
> Then* I have read* all the pages like
>
> *a.) http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Apache-CGI
> <http://mojolicious.org/perldoc/Mojolicious/Guides/Cookbook#Apache-CGI>b.)
> https://github.com/kraih/mojo/wiki/Apache-deployment
> <https://github.com/kraih/mojo/wiki/Apache-deployment>*
>
> and I put following into my .htaccess
>
>
> AddHandler cgi-script .pl
> Options +ExecCGI
> IndexIgnore *
>
> RewriteEngine on
>
> RewriteCond %{DOCUMENT_ROOT}/public/%{REQUEST_URI} -f
> RewriteRule ^(.*) public/$1 [L]
>
> RewriteCond %{DOCUMENT_ROOT}/%{REQUEST_URI} !-f
> RewriteRule ^(.*) script/premium_career_scout.pl [L]
>
>
>
>
> On my shared webspace I have the projects in a www directory.
> For this case it's in:
> www/mojo/premium_career_scout
>
> and the document-root for the project is also set on
> www/mojo/premium_career_scout
>
>
> If I call https://mojo.premiumcareerscout.ch/
> I get the correct page. I also checked if the css and js files are
> reachable...
> everything seems to be ok!
>
> But on the right upper side of the page I have three links
> 1.) /faq
> 2.) /contacts
> 3.) /jobsuchmaschinen
>
> If I click on such a link, nothing happens. If I do the same on the
> developing computer
> with morbo, everything is working.
>
> Here is the content of PremiumCareerScout.pm
>
>
> package PremiumCareerScout;
> use Mojo::Base 'Mojolicious';
>
> # This method will run once at server start
> sub startup {
> my $self = shift;
>
> # Documentation browser under "/perldoc"
> $self->plugin('PODRenderer');
>
> # Router
> my $r = $self->routes;
>
> # Normal route to controller
> $r->get('/')->to('Portal#main');
> $r->get('/faq')->to('Portal#faq');
> $r->get('/contacts')->to('Portal#contacts');
> $r->get('/jobsuchmaschinen')->to('Portal#jobsuchmaschinen');
>
>
> }
>
> 1;
>
>
>
>
> What I'm doing wrong?
> Can someone help my?
>
> Thank you very much
>
> Michael
>
Hi Stefan
The code-snippet for the 'portal'-page is
<!-- Dieses Template enthält das Layout für die Portal-Seite -->
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="utf-8">
<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="/css/custom.css">
<link rel="stylesheet" type="text/css" href="/css/stickyFooter.css">
<link rel="stylesheet" type="text/css" href="/css/jquery-ui.min.css">
<title><%= title %></title>
</head>
<body>
<div class="container">
<!-- Laden der Navigation oben -->
<%= include 'layouts/navbarV003' %>
<!-- Laden der linken Navigation -->
<%= include 'layouts/leftSideBarV003' %>
<!-- Center Column -->
<div class="col-sm-6">
<%== $content %>
</div>
<!-- Laden der rechten Navigation -->
<%= include 'layouts/rightSideBarV003' %>
</div>
</body>
</html>
The code-snippet for the template of the rightSideBarV003 is
Code h <!-- Right Column -->
<div class="col-sm-3">
<!-- Form -->
<!-- List-Group Panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h1 class="panel-title"><span class="glyphicon
glyphicon-question-sign"></span> Support</h1>
</div>
<div class="list-group">
<a href="/faq" class="list-group-item">FAQ's</a>
<a href="/contacts" class="list-group-item">Kontakt</a>
<!-- <a href="#" class="list-group-item">Dynamically
Innovate</a> -->
<!-- <a href="#" class="list-group-item">Objectively
Innovate</a> -->
<!-- <a href="#" class="list-group-item">Proactively
Envisioned</a> -->
</div>
</div>
<!-- List-Group Panel -->
<div class="panel panel-default">
<div class="panel-heading">
<h1 class="panel-title"><span class="glyphicon
glyphicon-triangle-right"></span> Artikel</h1>
</div>
<div class="list-group">
<a href="/jobsuchmaschinen"
class="list-group-item">Jobsuchmaschinen</a>
<!-- <a href="/cgi-bin/contacts"
class="list-group-item">Kontakt</a> -->
<!-- <a href="#" class="list-group-item">Dynamically
Innovate</a> -->
<!-- <a href="#" class="list-group-item">Objectively
Innovate</a> -->
<!-- <a href="#" class="list-group-item">Proactively
Envisioned</a> -->
</div>
</div>
</div><!--/Right Column -->
ier eingeben...
In the code above you can see the links /faq /contacts and a little bit
below /jobsuchmaschinen.
All links are 'hard-coded' in html because they never change: <a
href="/fq">FAQ</a> as example.
If I click on such a link, the url changes to
mojo.premiumcareerscout.ch/faq, but the content of the page is the same.
The content is written in the library Portal in the subfunction faq or also
the same in contacts:
sub contacts{
my $self = shift;
my $content = '
<!-- Heading -->
<div>
<h1 class="page-header">Kontakt</h1>
</div>
<!-- /.row -->
Bei Fragen jeglicher Art wenden Sie sich bitte per
<a href="mailto:supportemail-address">E-Mail</a> an unseren
Support<br>
support-email-address.ch
<br><br>Herzlichen Dank<br><br>
Ihr sender
';
$self->render( content => $content );
}
The code above is shorter then the version for the faq's that's why I
published this code.
I hope I could answer your questions...
Regards
Michael
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.