You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2020/12/23 09:50:48 UTC
[GitHub] [apisix] kuberxy opened a new issue #3111: request help: Convert HTTPS to HTTP in apisix
kuberxy opened a new issue #3111:
URL: https://github.com/apache/apisix/issues/3111
like this nginx conf:
```nginx
# Force HTTPS
server {
listen 80;
server_name yourdomain.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
# SSL termination
server {
listen 443 ssl;
server_name yourdomain.com;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log error;
ssl_certificate /etc/ssl/nginx/yourdomain.com.crt;
ssl_certificate_key /etc/ssl/nginx/yourdomain.com.key;
location / {
proxy_set_header Host $host;
proxy_pass http://localhost:8800;
}
}
# Clear HTTP
server {
listen 8800;
server_name yourdomain.com;
root /var/www;
location /index.html {
if_modified_since off;
etag off;
expires -1;
}
location / {
try_files $uri/ $uri /index.html;
}
}
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #3111: request help: Convert HTTPS to HTTP in apisix
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #3111:
URL: https://github.com/apache/apisix/issues/3111#issuecomment-750311970
You can create a SSL object: https://github.com/apache/apisix/blob/master/doc/admin-api.md#ssl,
and then create a route object to match the host: https://github.com/apache/apisix/blob/master/doc/admin-api.md#route
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] kuberxy commented on issue #3111: request help: Convert HTTPS to HTTP in apisix
Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #3111:
URL: https://github.com/apache/apisix/issues/3111#issuecomment-750671350
> You can create a SSL object: https://github.com/apache/apisix/blob/master/doc/admin-api.md#ssl,
> and then create a route object to match the host: https://github.com/apache/apisix/blob/master/doc/admin-api.md#route
but how to implement proxy_pass in apisix?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander closed issue #3111: request help: Convert HTTPS to HTTP in apisix
Posted by GitBox <gi...@apache.org>.
spacewander closed issue #3111:
URL: https://github.com/apache/apisix/issues/3111
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] kuberxy commented on issue #3111: request help: Convert HTTPS to HTTP in apisix
Posted by GitBox <gi...@apache.org>.
kuberxy commented on issue #3111:
URL: https://github.com/apache/apisix/issues/3111#issuecomment-750684995
Is there a good way?
config.yaml:
```yaml
apisix:
config_center: yaml
enable_admin: false
enable_server_tokens: false
node_listen: 8800
nginx_config:
error_log_level: "error"
http_configuration_snippet: |
server {
listen 80;
server_name yourdomain.com;
rewrite ^ https://$server_name$request_uri? permanent;
}
server {
listen 443 ssl;
server_name yourdomain.com;
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log error;
ssl_certificate /etc/ssl/nginx/yourdomain.com.crt;
ssl_certificate_key /etc/ssl/nginx/yourdomain.com.key;
location / {
proxy_set_header Host $http_host;
proxy_pass http://localhost:8800;
}
}
```
apisix.yaml:
```yaml
upstreams:
-
id: 1
name: "tomcat"
nodes:
"192.168.1.1:8090": 1
"192.168.1.2:8090": 1
"192.168.1.3:8090": 1
type: roundrobin
routes:
-
uri: /*
upstream_id: 1
#END
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org