Jump to content

How use symbol link created by envoy to use in apache?


Recommended Posts

Hello,
I work with envoy installing, like  https://dyrynda.com.au/blog/an-envoyer-like-deployment-script-using-envoy:
and I run the script when ln command is run successfully
  # Import the environment config
    echo 'Linking .env file';
    cd {{ $release_dir }}/{{ $release }};
    ln -nfs {{ $base_dir }}/.env .env;

    # Symlink the latest release to the current directory
    echo 'Linking current release';
    ln -nfs {{ $release_dir }}/{{ $release }} {{ $current_dir }};

As I see symbol link to newly release directory is created. But I am not sure how to use it?

with apache installed on my ubuntu server

I tried to create new config dir but running
a2ensite hostels2.com.conf and restarting apache I got errors:
Apr 30 12:29:46 nsn-do-lamp systemd[1]: Starting The Apache HTTP Server...
Apr 30 12:29:46 nsn-do-lamp apachectl[6403]: AH00112: Warning: DocumentRoot [/var/www/html/Hostels2Deployed/current/public] does not exist
Apr 30 12:29:46 nsn-do-lamp apachectl[6403]: (2)No such file or directory: AH02291: Cannot access directory '/var/www/html/Hostels2Deployed/current/storage/logs/' for error log of vhost defined at /etc/apache2/sites
Apr 30 12:29:46 nsn-do-lamp apachectl[6403]: AH00014: Configuration check failed
Apr 30 12:29:46 nsn-do-lamp apachectl[6403]: Action 'start' failed.
Apr 30 12:29:46 nsn-do-lamp apachectl[6403]: The Apache error log may have more information.
Apr 30 12:29:46 nsn-do-lamp systemd[1]: apache2.service: Control process exited, code=exited status=1
Apr 30 12:29:46 nsn-do-lamp systemd[1]: apache2.service: Failed with result 'exit-code'.
Apr 30 12:29:46 nsn-do-lamp systemd[1]: Failed to start The Apache HTTP Server.


In my /etc/apache2/sites-available/hostels2.com.conf :

 <VirtualHost *:80>
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/html/Hostels2Deployed/current/public
    ServerName myurl
    ServerAlias myurl

    <Directory /var/www/html/Hostels2Deployed/current/public>
      AllowOverride All
      Order Deny,Allow
      Allow from all
      Require all granted
    </Directory>

    Options FollowSymLinks
    DirectoryIndex index.php

    ErrorLog /var/www/html/Hostels2Deployed/current/storage/logs/error.log
    CustomLog /var/www/html/Hostels2Deployed/current/storage/logs/access.log combined
</VirtualHost>

The output of my envoy command has.

7.4]: Step # 5 : Symlink set
[lardeployer@138.68.107.4]: Step # 50  : /var/www/html/Hostels2Deployed/release/20190430151627
[lardeployer@138.68.107.4]: Step # 5 : Symlink has been set current_dir : /var/www/html/Hostels2Deployed/current

But on my server I see wrong link, but I do not see why:
cd /var/www/html/Hostels2Deployed/current

https://imgur.com/a/Sw22oWh

?

Thanks!
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.