What hippo and huck said. Some bits to add:
I just dump all of my scripts into /var/www/html (and the modules i create are under a subfolder, ./Pm).
Stuffing CGI files into cgi-bin is just a convention to keep executables and static content separate. You might as well tell apache to treat certain files in the DocumentRoot as executalble CGI files.
# important config bits as from huck for DocumentRoot <Directory /var/www/html> ... Options +ExecCGI AddHandler cgi-script .cgi .pl ... </Directory>
This marks as and makes into executables files ending with either .cgi or .pl
just at the root of your http servers document tree, including subfolders.You might want to add directives to the subfolder Pm, so people don't get to see your afwul modules either :-P
oh yes - i wish to not have to "sudo" into the conf files all the time - my password is not easy to type.
huck told you to run sudo -i which creates a login shell. I'm always using sudo -s which just creates a new shell (without all the stuff a proper login does). Since I want use all my personal quirks as a root user also (i.e. just want to impersonate myself with super powers), I have this line in /etc/sudoers:
Defaults !env_reset
The blanks are a real tab, and you must edit this file (/etc/sudoers) with visudo. With that line, I preserve environment, shell and other settings (e.g. ~/.vimrc) as I'm used to and don't have to sync stuff between /root and my homedir. But one must keep in mind that some programs re-create their files which after the fact aren't accessible as a less priviledged user, e.g. ~/.lesshst used by less(1), so be careful. If something goes wrong after impersonating yourself, check the ownership and permissions of files in your home directory, specially files and directories that begin with a dot (".").
so some jargon is okay, save for linux jargon, you might lose me...see?
That's ok, just don't hesitate to ask, even (in my case, other monks might not want that) with a private message.
In reply to Re: perl and apache2 on ubuntu 17.04
by shmem
in thread perl and apache2 on ubuntu 17.04
by jamroll
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |