Basically i have followed steps from this link: https://docs.gitlab.com/ee/ci/examples/laravel_with_gitlab_and_envoy/
I am using apache server instead of NGINX and that is the only difference.
So there is one envoy file which will do below:
- clone repository
- run composer
- update symlinks
code of envoy file is as same as: https://docs.gitlab.com/ee/ci/examples/laravel_with_gitlab_and_envoy/#full-script except git url change and root directories change.
So setup is like this: example.com (dummy url) is pointed to my app directory which is /var/www/html/deployer-home/current/public
here current is a symlink which will point to /var/www/html/deployer-home/releases/1 and if i will upload new release symlink will change to /var/www/html/deployer-home/releases/2
if i will so ls -l in server then symlink display the /var/www/html/deployer-home/releases/2 but example.com is still pointed to /var/www/html/deployer-home/releases/1
i Have tried to service apache2 restart but still it's domain pointing is not getting updated. It will only update if i will perfrom reboot in server.
So how to fix this issue? I don't want to restart the server for every release.
You can gracefully restart the Apache v1.x or v2.x httpd daemon
You need to send USR1 signal to the Apache server:
You can run a configuration file syntax test as follows:
Type the following command as a root user:
OR
Reload HTTPD Configuration File Without Restarting Apache When Using Systemd: