Ssl wildcard all site types#1171
Conversation
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Correct solver debug message Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Update doc comment Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
php/class-ee-site.php
Outdated
| $parent_site_name = implode( '.', array_slice( explode( '.', $site_name ), 1 ) ); | ||
| $parent_site = Site::find( $parent_site_name, [ 'site_ssl', 'site_ssl_wildcard' ] ); | ||
|
|
||
| if ( $needs_wildcard ) { |
There was a problem hiding this comment.
If you know that you're not going to do anything and throw an error if the function's second parameter is exists then why call that function in first place?
if ( $wildcard ) {
throw new Exception( '--wildcard cannot be used with --ssl=inherit' );
} else {
$this->inherit_certs( $site_name );
}
php/class-ee-site.php
Outdated
| */ | ||
| private function get_cert_domains( string $site_name, $wildcard ) : array { | ||
| $domains = [ $site_name ]; | ||
| $has_www = strpos( $site_name, 'www.' ) === 0; |
There was a problem hiding this comment.
$has_www = ( strpos( $site_name, 'www.' ) === 0 );
php/class-ee-site.php
Outdated
| * @return string Domain name with or without www | ||
| */ | ||
| private function get_www_domain( string $site_name ) : string { | ||
| $has_www = strpos( $site_name, 'www.' ) === 0; |
There was a problem hiding this comment.
$has_www = ( strpos( $site_name, 'www.' ) === 0 );
php/site-utils.php
Outdated
| * @param bool $inherit inherit cert or not. | ||
| */ | ||
| function add_site_redirects( $site_name, $le ) { | ||
| function add_site_redirects( string $site_name, $ssl, $inherit ) { |
There was a problem hiding this comment.
Please maintain code consistency. here you're defining data type of function variable and other places you're not. Either you define it for all or not at all.
ref: https://github.com/EasyEngine/easyengine/pull/1171/files#diff-43605c4fabcca6b901ccbab377546cfeR404
php/site-utils.php
Outdated
| $content = " | ||
| server { | ||
| listen 80; | ||
| server_name $site_name_without_www; |
There was a problem hiding this comment.
Can this go in mustache template? It will be easy to read and update config in that.
php/site-utils.php
Outdated
| $content = " | ||
| server { | ||
| listen 80; | ||
| server_name $site_name_with_www; |
There was a problem hiding this comment.
Can this go in mustache template? It will be easy to read and update config in that.
|
@mbtamuli Please review this PR for config related changes. |
|
@rahulsprajapati I've checked all the config regarding this wildcard configuration. |
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
php/site-utils.php
Outdated
| } | ||
|
|
||
| $conf_data = [ | ||
| 'site_name' => $site_name, |
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
Signed-off-by: Kirtan Gajjar <kirtangajjar95@gmail.com>
…o ssl-wildcard-all-site-types
|
HI , when i try ee site create example.com --ssl=le get ssl file (.crt, .key,. pem ) on easyengine/nginx-proxy:v4.0.0-beta.6 container . it default type RSA-4096 . but i need type RSA-2048 for site . how to do? |
Issue ref: #1170 and EasyEngine/site-command#77
Other than that, this PR -
Related PRs:
EasyEngine/site-command#98
EasyEngine/site-type-wp#17
EasyEngine/shell-command#5
closes #1170 and closes #77