I have a working laravel staging site on a DO server which uses ubuntu 22.04 and php 8.1. I am now moving it to production. I decided I'd serve this from the same server so i created a copy of the staging site on a new folder (~/live/mysite.com) I amended the .env file so it uses the APP_ENV = production and APP_URL is my new url. I also added a new apache conf file and enabled this. I then ran certbot to get t a cert for this and restarted apache. All at this point was correct and no errors. I then ran some php artisan commands to reset any caches and to configure the site for production.
At this point so far as i can tell the site should now work from a browser. When I try however after about a minute I get an ```Unable to connect
An error occurred during a connection to mysite.com. ```
Looking at this in my dev consoles timings tab it seems the entire request is being blocked. I have tried to ping the address and this is failing. although if i use the ip it works (the original staging site is still also being served). In the public folder I have placed a test.php file which has phpinfo() in it but this is not hit either (again it is for the staging site on this box)
Here's what I have:
my .env
APP_NAME=JobAdmin
APP_ENV=production
APP_KEY=base64:some key or another
APP_DEBUG=false
#APP_URL=http://127.0.0.1:8000
APP_URL=https://jobadmin.mysite.com
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_database
DB_USERNAME=my_user
DB_PASSWORD=my_password
BROADCAST_DRIVER=log
CACHE_DRIVER=redis
FILESYSTEM_DISK=local
QUEUE_CONNECTION=redis
SESSION_DRIVER=redis
#SESSION_DOMAIN=127.0.0.1
SESSION_DOMAIN=jobadmin.mysite.com
SESSION_LIFETIME=120
MEMCACHED_HOST=127.0.0.1
REDIS_CLIENT=phpredis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_MAILER= ....
....
....
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=
AWS_USE_PATH_STYLE_ENDPOINT=false
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
PUSHER_APP_CLUSTER=mt1
MIX_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
MIX_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"
my apache conf file
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName jobadmin.mysite.com
ServerAdmin [email protected]
DocumentRoot /home/eclipse/live/laravel.jobadmin.ecl/htdocs/public
<Directory /home/eclipse/live/laravel.jobadmin.ecl/htdocs/public/>
Options Indexes MultiViews
AllowOverride All
Require all granted
Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains"
</Directory>
ErrorLog /home/eclipse/live/laravel.jobadmin.ecl/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/jobadmin.mysite.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/jobadmin.mysite.com/privkey.pem
</VirtualHost>
</IfModule>
Finally my access.log file does have a reference to the url and it is saying 200 for the status? There is nothing in any of the error logs. So to me this seems to be that it is correctly serving. I have tried rebooting and also tried in different browsers and on other machines but same timeout kind of issues