में काम करने के लिए एसएसएल नहीं मिल सकता है मुझे यह कहकर शुरू करना है कि मैं कोई सर्वर प्रशासक नहीं हूं और मुझे बहुत सी चीजें नहीं हैं। इस वजह से मुझे यकीन है कि मैंने कहीं भी अपना डॉकर कंटेनर स्थापित करने में गलती की है, क्योंकि एसएसएल काम नहीं करता है।डॉकर कंटेनर
कंटेनर Ubuntu 14.04 पर अपाचे 2.4 चल रहा है पीएचपी 5.6 के साथ और एक MySQL 5.6 डोकर कंटेनर से जुड़ा हुआ है।
मैंने डॉकर - Official PHP Repo से इस मूल सेटअप के साथ शुरुआत की। यहाँ प्रासंगिक फ़ाइलें हैं:
Dockefile
FROM php:5.6-apache
RUN apt-get update
RUN apt-get install -y net-tools
RUN docker-php-ext-install pdo pdo_mysql
RUN docker-php-ext-install sockets
RUN a2enmod rewrite
RUN a2enmod ssl
ADD 000-default.conf /etc/apache2/sites-enabled/
ADD default-ssl.conf /etc/apache2/sites-anabled/
ADD apache2.conf /etc/apache2/
ADD www-server/ www-server/
EXPOSE 443
000-default.conf
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot /www-server/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
<Directory /home/www-server/>
# allow .htaccess overrides to work
AllowOverride All
DirectoryIndex login.html index.html index.php
</Directory>
<Directory /home/www-server/client>
DirectoryIndex home.html
Options All
AllowOverride All
Require all granted
</Directory>
डिफ़ॉल्ट-ssl.conf
apache2.conf
Mutex file:/var/lock/apache2 default
PidFile /var/run/apache2/apache2.pid
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User www-data
Group www-data
HostnameLookups Off
ErrorLog /proc/self/fd/2
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
# ports.conf
Listen 80
<IfModule ssl_module>
Listen 443
</IfModule>
<IfModule mod_gnutls.c>
Listen 443
</IfModule>
<Directory />
Options FollowSymLinks
AllowOverride None
Require all denied
</Directory>
<Directory /home/www-server/>
Options Indexes FollowSymLinks Includes ExecCGI
AllowOverride All
Require all granted
</Directory>
DocumentRoot /home/www-server
AccessFileName .htaccess
<FilesMatch "^\.ht">
Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
CustomLog /proc/self/fd/1 combined
<FilesMatch \.php$>
SetHandler application/x-httpd-php
</FilesMatch>
# Multiple DirectoryIndex directives within the same context will add
# to the list of resources to look for rather than replace
# https://httpd.apache.org/docs/current/mod/mod_dir.html#directoryindex
DirectoryIndex disabled
DirectoryIndex index.php index.html
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
नोट: मैं इन फ़ाइलों में से गैर प्रासंगिक भागों को हटा दिया है।
::1 - - [10/Nov/2015:19:26:19 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.4.10 (Debian) PHP/5.6.15 OpenSSL/1.0.1k (internal dummy connection)"
::1 - - [10/Nov/2015:19:26:20 +0000] "OPTIONS * HTTP/1.0" 200 152 "-" "Apache/2.4.10 (Debian) PHP/5.6.15 OpenSSL/1.0.1k (internal dummy connection)"
72.5.190.136 - - [10/Nov/2015:19:26:21 +0000] "\x16\x03\x01" 400 0 "-" "-"
72.5.190.136 - - [10/Nov/2015:19:26:21 +0000] "\x16\x03\x01" 400 0 "-" "-"
72.5.190.136 - - [10/Nov/2015:19:26:21 +0000] "\x16\x03\x01" 400 0 "-" "-"
ब्राउज़र में इस त्रुटि के साथ:
ERR_SSL_PROTOCOL_ERROR
sudo docker run -v /home/src/ssl-cert:/etc/ssl/certs --name app-gateway --link mysql56:mysql -p 80:80 -p 443:443 -d app-image
यहाँ लॉग फ़ाइलों का एक वर्ग है:
डोकर कंटेनर मैं इस का उपयोग चलाने के लिए
टीएल; डीआर मैंने डॉकर कंटेनर में अपने एसएसएल प्रमाणपत्रों को स्थापित करने और उपयोग करने के लिए ऑनलाइन पाए गए सभी चरणों का पालन किया है, लेकिन मुझे इसे काम करने में कोई सफलता नहीं मिली है। क्या कोई स्पष्ट है कि मैंने एसएसएल को डॉकर कंटेनर में काम करने के लिए अनदेखा किया है?
अब – RiggsFolly
हू लड़का को चोट पहुंचाना पड़ा, यह वास्तव में है। और * कई * लोगों ने इसे याद किया @RiggsFolly –
यही कारण है कि मुझे ऐसे आईडीई पसंद हैं जिनमें वर्तनी-जांचकर्ता हैं :) –