# First Question

**URL:** <https://www.ruby-forum.com/t/first-question/213403>\
**Category:** NGINX\
**Created:** [November 1, 2011, 4:06am UTC](https://www.ruby-forum.com/t/first-question/213403 "2011-11-01T04:06:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![luislavena](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/l/0ea827/32.png) [@luislavena](https://www.ruby-forum.com/u/luislavena)\
**Post date:** [November 1, 2011, 4:06am UTC](https://www.ruby-forum.com/t/first-question/213403/1 "2011-11-01T04:06:29Z")

</div>

People,

I want to switch my Apache SSL to Nginx - that might help me resolve a  
Ruby on  
Rails issue and it is too much work to change all the non-SSL stuff  
over as  
well - I will do that later when I have time. So for the time being,  
http will  
be handled by Apache and https will be handled by Nginx.

I commented out the default server in:

/etc/nginx/nginx.conf

and changed:

/etc/nginx/conf.d/ssl.conf

thus:

# 

# HTTPS server configuration

# 

server {  
listen 443;  
server\_name www.pricom.com.au;  
access\_log /var/log/nginx/nginx.vhost.access.log;  
error\_log /var/log/nginx/nginx.vhost.error.log;

```
 ssl on;
 ssl_certificate /etc/httpd/conf/ssl.crt/RapidSSL.crt;
 ssl_certificate_key /etc/httpd/conf/ssl.key/mars-server.key;

 ssl_session_timeout 5m;

 ssl_protocols SSLv2 SSLv3 TLSv1;
 ssl_ciphers

```

ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;  
ssl\_prefer\_server\_ciphers on;

```
 location / {
     root /var/www/ssl/wac;
 }

```

}

but in:

/var/log/nginx/nginx.vhost.error.log

I get:

2011/11/01 13:50:28 [error] 9411#0: \*7 open()  
“/usr/share/nginx/html/wac”  
failed (2: No such file or directory), client: 203.206.181.78, server:  
www.pricom.com.au, request: “GET /wac HTTP/1.1”, host: “pricom.com.au”

Why is nginx reverting to the default path and how is it getting the  
right  
dir without the correct path?

Thanks,

Phil.

–  
Philip R.

GPO Box 3411  
Sydney NSW 2001  
Australia  
E-mail: removed\_email\_address@domain.invalid

---

<div class="post-metadata">

**Author:** ![unebaguettesvp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/47e85d/32.png) [@unebaguettesvp](https://www.ruby-forum.com/u/unebaguettesvp)\
**Post date:** [November 1, 2011, 4:10am UTC](https://www.ruby-forum.com/t/first-question/213403/2 "2011-11-01T04:10:10Z")

</div>

A beginner’s guess…

Your server is listening on port 443 (HTTPS). Your log file shows that  
the  
file not found is being generated by the HTTP protocol for which your  
configuration is not listening on. Are you should that you’re accessing  
your site using “https://” and not “http://”?

…GET /wac HTTP/1.1", …

---

<div class="post-metadata">

**Author:** ![unebaguettesvp](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/47e85d/32.png) [@unebaguettesvp](https://www.ruby-forum.com/u/unebaguettesvp)\
**Post date:** [November 1, 2011, 8:42am UTC](https://www.ruby-forum.com/t/first-question/213403/3 "2011-11-01T08:42:46Z")

</div>

On Mon, Oct 31, 2011 at 11:05 PM, Philip R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
wrote:

> # 
> 
> ssl\_session\_timeout 5m;
> 
> ssl\_protocols SSLv2 SSLv3 TLSv1;  
> ssl\_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;  
> ssl\_prefer\_server\_ciphers on;
> 
> location / {  
> root /var/www/ssl/wac;  
> }  
> }

Did you restart nginx after these changes?

> but in:
> 
> /var/log/nginx/nginx.vhost.error.log
> 
> I get:
> 
> 2011/11/01 13:50:28 [error] 9411#0: \*7 open() “/usr/share/nginx/html/wac”  
> failed (2: No such file or directory), client: 203.206.181.78, server:  
> www.pricom.com.au, request: “GET /wac HTTP/1.1”, host: “pricom.com.au”

You get 404, correct? Restart nginx and see if it still does this.

> Why is nginx reverting to the default path and how is it getting the right  
> dir without the correct path?

Why not use nginx to proxy\_pass ssl to http apache back end?
