Closed kennoosh closed 7 years ago
the OS is ubuntu 14; perl is v5.22.1, and I have installed " MIME::Base64"
The problem is not related to the perl script but to your Apache configuration. See INSTALLATION in the documentation (README file) and especially the "Post install" chapter and the configuration sample:
Alias /sareport /usr/local/sendmailanalyzer/www
<Directory /usr/local/sendmailanalyzer/www>
Options ExecCGI
AddHandler cgi-script .cgi
DirectoryIndex sa_report.cgi
Order deny,allow
Deny from all
Allow from 127.0.0.1
Allow from ::1
# Allow from .example.com
</Directory>
I added that setting in the apache, but I got 403 forbidden issue: Alias /sareport /usr/local/sendmailanalyzer/www <Directory /usr/local/sendmailanalyzer/www> Options ExecCGI AddHandler cgi-script .cgi DirectoryIndex sa_report.cgi Order deny,allow Allow from all
</Directory>
I googled it and someone suggested to use "Require all granted" instead of "Order deny,allow"; so I changed it as:
Alias /sareport /usr/local/sendmailanalyzer/www
<Directory /usr/local/sendmailanalyzer/www>
Options ExecCGI
AddHandler cgi-script .cgi
DirectoryIndex sa_report.cgi
Require all granted
</Directory>
The I can access it but the response is not UI page, it just show all perl scripts;
What is your version of Apache httpd server (output of apache2 -v
) and the version of your operating system?
Sorry, I just seen your note above: OS is ubuntu 14, I have the same on my laptop and my configuration is:
Alias /sareport /usr/local/sendmailanalyzer/www/
<Directory /usr/local/sendmailanalyzer/www/>
Options All +ExecCGI
Require all granted
AddHandler cgi-script .cgi
DirectoryIndex sa_report.cgi
</Directory>
into /etc/apache2/sites-enabled/000-default.conf default virtual host.
Does it work for you ? my apache version is 2.4, and I added it in /etc/apache2/sites-enabled/default-ssl.conf because we disabled the HTTP request; all http request will automatically be rewritten to HTTPS;
Yes it works great for me, perhaps you have to enable the cgi module too.
sudo a2enmod cgi
sudo service apache2 reload
yeah, it works, thank you very much
Hi I installed the sendmailanalyzer following the instruction, but when I open the page: https://xx.xx.xx.xx/sareport/; it doesn't give me any UI page, it only show all perl scripts; please review the attached file; do you know why is that?
sareport.txt
Thanks