私は3つのプロジェクトを持っています。最初は静的なHTML Webサイトで、他の2つのプロジェクトはLaravelプロジェクトです。セットアップサブディレクトリをLaravelプロジェクトにリダイレクト
メインウェブサイト用にSSL証明書が設定されています。他のLaravelプロジェクトをメインURLのサブディレクトリとしてセットアップしたいと思います。
confファイルにエイリアスを追加しましたが、動作しません。 「https://example.com/admin/」を開こうとすると、リダイレクトが多すぎます。リダイレクトされたページを開いて別のページを開いて、元のページを開くようにリダイレクトされた場合に発生することがあります。
htaccessファイルに追加する必要がある変更はありますか?
は、ここに私のwebsite.confファイル
<VirtualHost *:80>
ServerName example.com
Redirect permanent/https://example.com/
</VirtualHost>
<VirtualHost *:443>
ServerName example.com
ServerAlias www.example.com
SSLEngine on
SSLCertificateFile /etc/apache2/ssl/***********.crt
SSLCertificateKeyFile /etc/apache2/ssl/*********.key
SSLCertificateChainFile /etc/apache2/ssl/*********.crt
ServerAdmin [email protected]
DocumentRoot /var/www/html/example/public_html/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /admin "/var/www/html/admin"
<Directory "/var/www/html/admin">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
Alias /admin2 "/var/www/html/admin2"
<Directory "/var/www/html/admin2">
Options Indexes FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
少し変更して、実際のサブフォルダ 'admin'と' admin2'を使用することが容易になるだろう'index.php'とdocrootの外にlaravelコードを持っています。ウェブからコードを見る必要はありません。 –