Re: [cgiapp] AutoRunmode vs Apache issue
Yes, I agree with Jerry. With "$self->mode_param(path_info => 1);" in the setup section and a corresponding Apache setup you can get short URLs without the AutoRunMode module that I don't know. And if you want more flexibility, you can try my patched CGI Application version https://github.com/MartinMcGrath/CGI--Application/pull/2 ;-) . Perhaps in the next version this will be implemented... > Gesendet: Donnerstag, 25. Mai 2017 um 14:21 Uhr > Von: jerry <je...@tr2.com> > An: "CGI Application" <cgiapp@lists.erlbaum.net> > Betreff: Re: [cgiapp] AutoRunmode vs Apache issue > Since you're just getting started, maybe you don't need autorunmode? > I have a pretty extensive cgiapp application, and I've never used it. > You just set up your run modes in setup() - it's not that much typing. > Back when I was putting my stuff together, I read that autorunmode was > fragile, and a security risk. So I just got started without it. I > do use Apache. > - Jerry Kaidor # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] AutoRunmode vs Apache issue
On 05/25/2017 03:04 AM, Simon Cruickshank wrote: > Lereta Email Checkpoint: External email. Please make sure you trust this > source before clicking links or opening attachments. > > ** > > Hi All, > > Sorry if this is a little off topic or has been answered before. > > I used the tutorial at http://www.perlmonks.org/?node_id=622071 to > create a website. It works great, but I have an issue with configuring > Apache to play nice with AutoRunmode > > I can configure apache so that > http://localhost/cgi-bin/WebApp.pl/thisrunmode works. > > But I want to simplify the url to http://localhost/thisrunmode but > when I configure the DirectoryIndex of the home directory to be > /cgi-bin/WebApp.pl it breaks AutoRunmode so the shortened URLs no > longer work. > > Could someone point me in the right direction as to whether it is > possible to achieve this with the right Apache configuration. I have never used autorunmode so this may be full-of-merde: LoadModule cgi_module modules/mod_cgi.so AddHandler cgi-script .cgi ServerName foo.example.org DocumentRoot /var/www/cgi-bin DirectoryIndex WebApp.pl (etc) ** Sorry if this is a duplicate. The first message was (maybe) bounced. -- Stephen Carville Serf Without Portfolio 800.537.3821 x1326 scarvi...@nospam.lereta.com - There is no "I" in Team but there is in Integrity. # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] AutoRunmode vs Apache issue
Simon Cruickshank writes > I can configure apache so that > http://localhost/cgi-bin/WebApp.pl/thisrunmode works. > > But I want to simplify the url to http://localhost/thisrunmode but > when I configure the DirectoryIndex of the home directory to be > /cgi-bin/WebApp.pl it breaks AutoRunmode so the shortened URLs no > longer work. > > Could someone point me in the right direction as to whether it is > possible to achieve this with the right Apache configuration. Could this be a job for the rewrite module? RewriteEngine on RewriteRule ^/thisrunmode(.*)$ /cgi-bin/WebApp.pl$1 [L] -- Cheers, Thomas Krichel http://openlib.org/home/krichel skype:thomaskrichel # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] AutoRunmode vs Apache issue
Since you're just getting started, maybe you don't need autorunmode? I have a pretty extensive cgiapp application, and I've never used it. You just set up your run modes in setup() - it's not that much typing. Back when I was putting my stuff together, I read that autorunmode was fragile, and a security risk. So I just got started without it. I do use Apache. - Jerry Kaidor On 05/25/2017 03:04, Simon Cruickshank wrote: > Hi All, > > Sorry if this is a little off topic or has been answered before. > > I used the tutorial at http://www.perlmonks.org/?node_id=622071 to > create a website. It works great, but I have an issue with configuring > Apache to play nice with AutoRunmode > > I can configure apache so that > http://localhost/cgi-bin/WebApp.pl/thisrunmode works. > > But I want to simplify the url to http://localhost/thisrunmode but > when I configure the DirectoryIndex of the home directory to be > /cgi-bin/WebApp.pl it breaks AutoRunmode so the shortened URLs no > longer work. > > Could someone point me in the right direction as to whether it is > possible to achieve this with the right Apache configuration. > > Many thanks in advance, > > Simon > > # CGI::Application community mailing list > #### > ## To unsubscribe, or change your message delivery options, ## > ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## > #### > ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## > ## Wiki: http://cgiapp.erlbaum.net/ ## > #### > # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####
Re: [cgiapp] AutoRunmode vs Apache issue
Hi, Simon, I think that DirectoryIndex is the wrong option (I think this option is only for the case, that your page is requested without any path argument (especially instead of the the usualyl called index.html). You have to rewrite all requests over your CGI-script. I have the following .htaccess setting: DirectoryIndex /cgi-bin/WebApp.cgi RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ /cgi-bin/WebApp.cgi/$1 [QSA,L] But I am also not very familiar with setting up Apache... At the moment I run my webpage over Plack. There is the setting a little bit different.. I know that setting up Apache, is a little bit tricky. I hope, I could help a little bit. If you have further questions, you are highly welcome.. Best wishes, Max # CGI::Application community mailing list #### ## To unsubscribe, or change your message delivery options, ## ## visit: http://www.erlbaum.net/mailman/listinfo/cgiapp## #### ## Web archive: http://www.erlbaum.net/pipermail/cgiapp/ ## ## Wiki: http://cgiapp.erlbaum.net/ ## ####