I followed this doc : http://www.jfrog.com/confluence/display/RTF/nginx

Here my /etc/nginx/sites-enabled/artifactory file : 

server {
    listen *:80 ;
    server_name artifactory.mycompany.com;
    client_max_body_size 2048M;
    location /artifactory {
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_pass http://localhost:8081;
        proxy_read_timeout 90;
    }
}


server {
    listen 443;
    server_name artifactory.mycompany.com;

    access_log /var/log/nginx/artifactory.mycompany.com.access.log;
    error_log /var/log/nginx/artifactory.mycompany.com.error.log;

    ssl on;
    ssl_certificate /etc/nginx/ssl/ssl-bundle.crt;
    ssl_certificate_key /etc/nginx/ssl/my-key.pem;

    ssl_session_timeout 5m;

    ssl_protocols SSLv3 TLSv1;
    ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
    ssl_prefer_server_ciphers on;

    location /artifactory {
        proxy_redirect off;
        proxy_set_header Host $host:$server_port;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Ssl on;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://localhost:8081;
        proxy_read_timeout 90;
    }

}

here is my /srv/artifactory/tomcat/conf/server.xml file:

<Server port="8015" shutdown="SHUTDOWN">

    <Service name="Catalina">
        <Connector port="8081" protocol="HTTP/1.1" maxThreads="500"
minSpareThreads="20" enableLookups="false" disableUploadTimeout="true"
backlog="100"/>

        
        <Connector port="8019" protocol="AJP/1.3"/>

        <Engine name="Catalina" defaultHost="localhost">
            <Host name="localhost" appBase="webapps"/>
        </Engine>

    </Service>
</Server>

here my /srv/artifactory/tomcat/conf/Catalina/localhost/artifactory.xml
file:

<Context path="/artifactory"
docBase="${artifactory.home}/webapps/artifactory.war" processTlds="false">
    <Manager pathname="" />
    <Valve className="org.apache.catalina.valves.RemoteIpValve"
protocolHeader="x-forwarded-proto"/>
</Context>

I changed in web interface too, restart nginx and artifactory services, but
when I trie use http://artifactory.mycompany.com the url field change to
artifactory.mycompany.com:443/artifactory/ with this msg:

400 Bad Request
The plain HTTP request was sent to HTTPS port
nginx/1.2.1





--
View this message in context: 
http://forums.jfrog.org/Problem-with-nginx-frontend-tp7579946.html
Sent from the Artifactory - Users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
Artifactory-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/artifactory-users

Reply via email to