請教一下前輩們!
我的一個Laravel項目在開發環境都ok,但佈署到雲端主機後卻只能顯示首頁,點其他網頁都:
網頁上出現:
Not Found
The requested URL was not found on this server.
Apache/2.4.41 (Ubuntu) Server at i58d.com Port 443
console控制台則出現:
GET https://***.com/register 404 (Not Found)
是我的apache2/site-available/檔案寫錯嗎?
我的/etc/apache2/sites-available/***.conf 如下:
<VirtualHost *:80>
ServerName ***.com
ServerAlias www.***.com
ServerAdmin id****e@gmail.com.com
DocumentRoot /var/www/***/public
<Directory /var/www/***/public>
Options -Indexes +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/***.com-error.log
CustomLog ${APACHE_LOG_DIR}/***.com-access.log combined
</VirtualHost>
我的/etc/apache2/sites-available/***-ssl.conf 如下:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin id***@gmail.com
DocumentRoot /var/www/***/public
ServerName ***.com
ServerAlias www.***.com
ErrorLog ${APACHE_LOG_DIR}/***_error.log
CustomLog ${APACHE_LOG_DIR}/***_access.log combined
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/***.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/***.com/privkey.pem
#<FilesMatch "\.(cgi|shtml|phtml|php)$">
# SSLOptions +StdEnvVars
#</FilesMatch>
#<Directory /usr/lib/cgi-bin>
# SSLOptions +StdEnvVars
#</Directory>
</VirtualHost>
</IfModule>
煩請前輩幫我看一眼,我哪裡有錯誤?