0

I have successfully deployed the Django project in my ubuntu VPS server. but when i try to install sudo certbot --apache -d amritshahi.com. I am getting the following error.

Enabling available site: /etc/apache2/sites-available/365-le-ssl.conf Error while running apache2ctl configtest. Action 'configtest' failed. The Apache error log may have more information.

AH00526: Syntax error on line 25 of /etc/apache2/sites-enabled/365.conf: Name duplicates previous WSGI daemon definition.

Rolling back to previous server configuration... Error while running apache2ctl configtest. Action 'configtest' failed. The Apache error log may have more information.

AH00526: Syntax error on line 25 of /etc/apache2/sites-enabled/365.conf: Name duplicates previous WSGI daemon definition.

inside 365.conf file:

<VirtualHost *:80>
        ServerAdmin me@amritshahi.com
        ServerName amritshahi.com
        ServerAlias www.amritshahi.com
        DocumentRoot /var/www/personal

        Alias /static /var/www/personal/Personal_Blog/static
        <Directory "/var/www/personal/Personal_Blog/static">
                Options Indexes FollowSymLinks
                Order allow,deny
                Allow from all
                Require all granted
        </Directory>

        Alias /media /var/www/personal/Personal_Blog/media
        <Directory "/var/www/personal/Personal_Blog/media">
                Options Indexes FollowSymLinks
                Order allow,deny
                Allow from all
                Require all granted</Directory>
        ErrorLog ${APACHE_LOG_DIR}/shahi_error.log
        CustomLog ${APACHE_LOG_DIR}/shahi_access.log combined

        WSGIDaemonProcess Personal_Blog python-home=/var/www/personal/Personal_>
        WSGIProcessGroup Personal_Blog
        WSGIScriptAlias / /var/www/personal/Personal_Blog/project/wsgi.py

        <Directory /var/www/personal/Personal_Blog/project>
                <Files wsgi.py>
                        Require all granted
                </Files>
        </Directory>
</VirtualHost>

Help Please??

  • Does this answer your question? [Certbot Apache error "Name duplicates previous WSGI daemon definition."](https://stackoverflow.com/questions/47803081/certbot-apache-error-name-duplicates-previous-wsgi-daemon-definition) – metatoaster Dec 23 '20 at 12:49
  • I have seen that before and tried once. but sites goes down. how to place 80 and 443 file in one .cnf file – AMRIT SHAHI Dec 23 '20 at 13:09

1 Answers1

1

Issue resloved using following step:

  1. comment affected line
  2. install certificate
  3. agan come to orign one and change WSGIDaemonProcess name
  4. restar apache server