How to run Python Scripts ( *.py files) on Apache2 (configuring unix apache2 servers)

Preparing (install apache2, python):
Installation Apache2:

sudo apt-get install apache2

Installation Python(choose one):

sudo apt-get install python
sudo apt-get install python2.7
sudo apt-get install python3

First step: enabling CGI processing in your apache (automatically enable mod_cgid).

sudo a2enmod cgi

Second step: Allow run CGI scripts in your directory.
You can try allow by .htaccess in your “python” web folder

Options +ExecCGI
AddHandler cgi-script .py

or you can allow .py files to be executed as scripts in a particular folder you would use config in apache conf file:

    <Directory /srv/www/mysite/public_html/python_folder>
        Options +ExecCGI
        AddHandler cgi-script .py
    </Directory>

Finish step:
Continue reading How to run Python Scripts ( *.py files) on Apache2 (configuring unix apache2 servers)

Joomla error instalation of component issue

If you install some component on your site and get this errors:

Warning
JFolder::create: Infinite loop detected.
Warning: Failed to move file!

and

Error:
Archive does not exist
Unable to find install package

 

Then 97% error in your configuration file.
Please go to admin area and
Continue reading Joomla error instalation of component issue

XAMPP: Change localhost to custom domain name

For windows developers [default disk: C]:
Example: www.mysite.tst instead of localhost/mysite.
Step 1: Go to C:\Windows\System32\drivers\etc and edit “as Administrator” => hosts file.
Add in end of file:

127.0.0.1	mysite.tst

Save and close.

Step 2: Go to C:\xampp\apache\conf\extra and edit httpd-vhosts.conf file.
Add in end of file:

<VirtualHost *:80>
    ServerName www.mysite.tst
    ServerAlias mysite.tst
    DocumentRoot c:/xampp/htdocs/mysite
</VirtualHost>

Save and close.

Final step…
Continue reading XAMPP: Change localhost to custom domain name