<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><pre>Here's my Nginx conf file:<br><br>server {<br> listen 192.210.207.15:80;<br> server_name starlight;<br><br> #charset koi8-r;<br> #access_log /var/log/nginx/log/host.access.log main;<br><br> location / {<br> root /usr/share/nginx/html;<br> index index.php index.html index.htm;<br> }<br><br> error_page 404 /404.html;<br><br> # redirect server error pages to the static page /50x.html<br> #<br> error_page 500 502 503 504 /50x.html;<br> location = /50x.html {<br> root /usr/share/nginx/html;<br> }<br><br> # proxy the PHP scripts to Apache listening on 127.0.0.1:80<br> #<br> #location ~ \.php$ {<br> # proxy_pass http://127.0.0.1;<br> #}<br><br> # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<br>
#<br> location ~ \.php$ {<br> root /usr/share/nginx/html;<br> fastcgi_pass 127.0.0.1:9000;<br> fastcgi_index index.php;<br> fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;<br> include fastcgi_params;<br> }<br><br> # deny access to .htaccess files, if Apache's document root<br> # concurs with nginx's one<br> #<br> location ~ /\.ht {<br> # deny all;<br> }<br>}<br><br><br>So it appears the document root is /usr/share/nginx/html.<br><br>Next, <br><br>mkdir /usr/share/nginx/html/pics<br><br>then I uploaded a file called snapshot1.png to the pics directory.<br><br>Next,<br><br>chown desertfrag /usr/share/nginx/html/pics.<br><br>I wanted to make sure the server was running so:<br><br>service php-fpm start<br>service nginx start<br>service mysql start<br><br>But when I execute http://192.210.207.15/snapshot1.png<br><br>I get a '404 Not Found'
response.<br><br>Any ideas?<br><br>----------------------------------------------<br></pre><pre><br>If you've got the webserver running, ll you need to di is figure out
where its documentroot is. I'm sure that is in its documentation
somewhere.
I'm not familiar with ngnix, but the typical "default" location is /var/www/
SSH into the box, use su/sudo to create a directory within that path.
Call it "pics" (or whatever you want)
Then chown it to your norml non-root user account (Make one if you
dont have ne)
Then all you need to do is SCP files into it.
URL will be <a href="http://[your_server_ip/">http://[your_server_IP</a>]/pics/whatever_the_filename_is.jpg<br><br><br>-------------------------------------------<br><br><br> On Tue, Mar 26, 2013 at 9:09 PM, desert frag <<a href="http://shinobu.grlug.org/cgi-bin/mailman/listinfo/grlug">desertfrag at yahoo.com</a>> wrote:
><i> Ok the server side of Linux is a new experience so bear with me.
</i>><i>
</i>><i> I've set up a web site on my VPS: <a href="http://192.210.207.15/">http://192.210.207.15/</a>
</i>><i>
</i>><i> Note it's Ngnix. I think php and mysql were installed.
</i>><i>
</i>><i> <a href="http://192.210.207.15/info.php">http://192.210.207.15/info.php</a>
</i>><i>
</i>><i> Hack away :)
</i>><i>
</i>><i> One suggestion was to use OwnCloud for an image hosting solution. Well,
</i>><i> it's a mess with CentOS right now.
</i>><i>
</i>><i> <a href="https://github.com/owncloud/documentation/issues/56">https://github.com/owncloud/documentation/issues/56</a>
</i>><i> <a href="https://github.com/owncloud/documentation/pull/67">https://github.com/owncloud/documentation/pull/67</a>
</i>><i>
</i>><i> Since it's a mess I haven't proceeded.
</i>><i>
</i>><i> My original question was:
</i>><i>
</i>>><i> I've been using my new VPS mostly as a linux test bed and to learn more
</i>>><i> about it. When I'm at a forum and want to attach a picture to a post I
</i>>><i> normally use places like photobucket or imageshack. I would like my new
</i>>><i> server to handle this instead. Any suggestions on what to use? We're
</i>>><i> talking an occasional need, low activity situation. CentOS x86-64.
</i>><i>
</i>><i> Another suggestion was:
</i>><i>
</i>><i> 'Just set up a simple web server with Nginx or Twisted, and an SSH bookmark
</i>><i> to the shared folder. Drag and drop at will.'
</i>><i>
</i>><i> Alright, since it appears Nginx is functioning ok how do I proceed? How are
</i>><i> images uploaded to the site? Do directories need to be created on the
</i>><i> server? What would be the url of the images if I wanted to point someone to
</i>><i> a picture(s)?
</i>><i>
</i>><i> Would appreciate specific step by steps. Thanks.</i></pre></div></body></html>