仮想ホストごとに1つのPhpMyAdmin

仮想ホストごとに1つのPhpMyAdmin

私は初心者であり、Linuxサーバーを学んでいます。私は数年前に彼らと遊んだ。

(dist)を使ってApache2、、、、Php5などMySQLを設定しましたPhpMyAdminRaspberryRaspbianDebian

作業したい仮想ホストをいくつか構成しましたが、今は各仮想ホストが特定のphpmyadminアクセスとデータベースを持つように構成できることを知りたいです。

私は数時間インターネット検索をしてきましたが、何も見つかりませんでした。

ありがとうございます! :)

ベストアンサー1

Raspberry Piを使用してDNSにアクセスするのと同じように、プライベートDNSサーバーを作成し、Raspberry PiのIPアドレスを設定してドメインを確認できます。 Apache以降、ServerNameディレクティブをphpmyadmin.xx.comとServerAliaswww.phpmyadmin.xx.comに設定します。 Bind9 を使用して DNS サーバーを作成する場合は個人名なので、どの名前でも使用でき、クライアント コンピューターで IP を DNS として構成した場合にのみ確認できます。サーバーを使用してドメインを購入して同じことを実行できます。 Apache2 ポストの設定

<VirtualHost *:80> 
     ServerName phpmyadmin.xxx.com
     ServerAlias www.phpmyadmin.xxx.com
     ServerSignature Off
     LogLevel warn
     ErrorLog /var/log/apache2/error.log
     CustomLog /var/log/apache2/access.log combined
     DocumentRoot /usr/share/phpmyadmin/
     # Secure your directory
     <Location />
        Options -Indexes
     </Location>
     # End Secure
     <Directory /usr/share/phpmyadmin/>
          Options +MultiViews +FollowSymLinks
          AllowOverride All # Enable .htaccess
          DirectoryIndex index.html index.htm index.php # Set file default
          Order allow,deny # Access Directory
          Allow from all # Access All 
          # or access you ip
          Allow from <you private/public ip>
     </Directory>
</VirtualHost>  

おすすめ記事