secretreeve
Posts: 330
Joined: Mon Feb 20, 2012 8:39 am

Re: PI file sharing server with remote login

Tue Dec 17, 2013 11:51 pm

Code: Select all

86.185.17.102 - - [17/Dec/2013:21:53:15 +0000] "-" 408 0 "-" "-"
192.168.0.3 - - [17/Dec/2013:21:56:36 +0000] "GET / HTTP/1.1" 200 482 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
127.0.0.1 - - [17/Dec/2013:21:56:42 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
127.0.0.1 - - [17/Dec/2013:21:56:42 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
127.0.0.1 - - [17/Dec/2013:21:56:42 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
127.0.0.1 - - [17/Dec/2013:21:56:42 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
127.0.0.1 - - [17/Dec/2013:21:56:42 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
127.0.0.1 - - [17/Dec/2013:21:56:43 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
127.0.0.1 - - [17/Dec/2013:21:58:03 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
127.0.0.1 - - [17/Dec/2013:21:58:03 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
127.0.0.1 - - [17/Dec/2013:21:58:03 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
127.0.0.1 - - [17/Dec/2013:21:58:03 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
127.0.0.1 - - [17/Dec/2013:21:58:03 +0000] "OPTIONS * HTTP/1.0" 200 126 "-" "Apache/2.2.22 (Debian) (internal dummy connection)"
192.168.0.3 - - [17/Dec/2013:22:00:08 +0000] "GET / HTTP/1.1" 304 208 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
192.168.0.3 - - [17/Dec/2013:22:04:11 +0000] "GET / HTTP/1.1" 304 208 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
192.168.0.1 - - [17/Dec/2013:22:04:17 +0000] "GET / HTTP/1.1" 200 482 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
93.97.108.169 - - [17/Dec/2013:22:04:50 +0000] "GET / HTTP/1.1" 200 482 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chro$
93.97.108.169 - - [17/Dec/2013:22:04:52 +0000] "GET /favicon.ico HTTP/1.1" 404 506 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like $
192.168.0.1 - - [17/Dec/2013:22:05:30 +0000] "GET / HTTP/1.1" 200 579 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
192.168.0.1 - - [17/Dec/2013:22:07:39 +0000] "GET / HTTP/1.1" 200 694 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
192.168.0.1 - - [17/Dec/2013:22:07:39 +0000] "GET /icons/blank.gif HTTP/1.1" 200 437 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:22:07:39 +0000] "GET /icons/movie.gif HTTP/1.1" 200 531 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:22:09:08 +0000] "GET / HTTP/1.1" 200 695 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
192.168.0.1 - - [17/Dec/2013:22:09:08 +0000] "GET /icons/blank.gif HTTP/1.1" 304 184 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:22:09:08 +0000] "GET /icons/movie.gif HTTP/1.1" 304 184 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:22:09:10 +0000] "GET / HTTP/1.1" 200 694 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
192.168.0.1 - - [17/Dec/2013:22:09:10 +0000] "GET /icons/blank.gif HTTP/1.1" 304 184 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:22:09:10 +0000] "GET /icons/movie.gif HTTP/1.1" 304 185 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
176.248.5.95 - - [17/Dec/2013:22:09:44 +0000] "GET / HTTP/1.1" 200 695 "-" "Mozilla/5.0 (Linux; U; Android 2.3.5; en-gb; HTC_WildfireS Build/GRJ90) AppleWeb$
176.248.5.95 - - [17/Dec/2013:22:09:44 +0000] "GET /icons/blank.gif HTTP/1.1" 200 436 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Linux; U; Android 2.3.5; $
176.248.5.95 - - [17/Dec/2013:22:09:44 +0000] "GET /icons/movie.gif HTTP/1.1" 200 532 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Linux; U; Android 2.3.5; $
176.248.5.95 - - [17/Dec/2013:22:09:44 +0000] "GET /favicon.ico HTTP/1.1" 404 506 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Linux; U; Android 2.3.5; en-g$
93.97.108.169 - - [17/Dec/2013:22:09:49 +0000] "GET / HTTP/1.1" 200 695 "http://www.facebook.com/l.php?u=http%3A%2F%2Fchrisanime.no-ip.biz%2F&h=cAQGZe4td" "$
176.248.5.95 - - [17/Dec/2013:22:09:50 +0000] "GET /Hellsing%20-%2001%20-%20The%20Undead.avi HTTP/1.1" 200 32619 "http://chrisanime.no-ip.biz/" "Mozilla/5.0$
93.97.108.169 - - [17/Dec/2013:22:09:51 +0000] "GET /icons/blank.gif HTTP/1.1" 200 436 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64) A$
93.97.108.169 - - [17/Dec/2013:22:09:51 +0000] "GET /icons/movie.gif HTTP/1.1" 200 532 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64) A$
93.97.108.169 - - [17/Dec/2013:22:10:49 +0000] "GET /Hellsing%20-%2001%20-%20The%20Undead.avi HTTP/1.1" 200 700983 "http://chrisanime.no-ip.biz/" "Mozilla/5$
93.97.108.169 - - [17/Dec/2013:22:11:48 +0000] "GET /Hellsing%20-%2001%20-%20The%20Undead.avi HTTP/1.1" 200 7468531 "http://chrisanime.no-ip.biz/" "Mozilla/$
93.102.6.235 - - [17/Dec/2013:22:46:01 +0000] "\xd5\x88" 501 279 "-" "-"
176.248.5.95 - - [17/Dec/2013:22:09:59 +0000] "GET /Hellsing%20-%2001%20-%20The%20Undead.avi HTTP/1.1" 200 270463283 "http://chrisanime.no-ip.biz/" "Mozilla$
192.168.0.1 - - [17/Dec/2013:23:22:11 +0000] "GET / HTTP/1.1" 200 695 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
192.168.0.1 - - [17/Dec/2013:23:22:11 +0000] "GET /icons/blank.gif HTTP/1.1" 304 184 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:23:22:11 +0000] "GET /icons/movie.gif HTTP/1.1" 304 184 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:23:22:14 +0000] "GET /Hellsing%20-%2001%20-%20The%20Undead.avi HTTP/1.1" 200 14688166 "http://chrisanime.no-ip.biz/" "Mozilla/5$
192.168.0.1 - - [17/Dec/2013:23:23:56 +0000] "GET / HTTP/1.1" 200 695 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
192.168.0.1 - - [17/Dec/2013:23:23:56 +0000] "GET /icons/blank.gif HTTP/1.1" 304 184 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:23:23:56 +0000] "GET /icons/movie.gif HTTP/1.1" 304 184 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:23:23:57 +0000] "GET / HTTP/1.1" 200 694 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
192.168.0.1 - - [17/Dec/2013:23:23:57 +0000] "GET /icons/blank.gif HTTP/1.1" 304 184 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:23:23:57 +0000] "GET /icons/movie.gif HTTP/1.1" 304 185 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:23:23:58 +0000] "GET / HTTP/1.1" 200 694 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:26.0) Gecko/20100101 Firefox/26.0"
192.168.0.1 - - [17/Dec/2013:23:23:58 +0000] "GET /icons/movie.gif HTTP/1.1" 304 184 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:23:23:58 +0000] "GET /icons/blank.gif HTTP/1.1" 304 184 "http://chrisanime.no-ip.biz/" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:$
192.168.0.1 - - [17/Dec/2013:23:23:59 +0000] "GET /Hellsing%20-%2001%20-%20The%20Undead.avi HTTP/1.1" 200 4343950 "http://chrisanime.no-ip.biz/" "Mozilla/5.$

a whole lot of stuff that probably shouldn't be to be honest, facebook, icons, the only thing that should be there is hellsing as far as stuff i recognise goes lol

is also went on a port checker and port 80 is showing as closed?

User avatar
DougieLawson
Posts: 37604
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: PI file sharing server with remote login

Wed Dec 18, 2013 12:08 am

I've found it.

There's a bunch of <Directory> ... </Directory> definitions starting at line 147 in /etc/apache2/apache2.conf

Take them ALL out.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

secretreeve
Posts: 330
Joined: Mon Feb 20, 2012 8:39 am

Re: PI file sharing server with remote login

Wed Dec 18, 2013 12:13 am

nano doesnt seem to have a line number display or something, but this is what i see around like 147 area

Code: Select all

# worker MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadLimit: ThreadsPerChild can be changed to this maximum value during a
#              graceful restart. ThreadLimit can only be changed by stopping
#              and starting Apache.
# ThreadsPerChild: constant number of worker threads in each server process
# MaxClients: maximum number of simultaneous client connections
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_worker_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
    MaxRequestsPerChild   0
</IfModule>

# event MPM
# StartServers: initial number of server processes to start
# MinSpareThreads: minimum number of worker threads which are kept spare
# MaxSpareThreads: maximum number of worker threads which are kept spare
# ThreadsPerChild: constant number of worker threads in each server process
# MaxClients: maximum number of simultaneous client connections
# MaxRequestsPerChild: maximum number of requests a server process serves
<IfModule mpm_event_module>
    StartServers          2
    MinSpareThreads      25
    MaxSpareThreads      75
    ThreadLimit          64
    ThreadsPerChild      25
    MaxClients          150
not seeing anything about directories :(

ok it does have a "to line" feature, just took a minute to see it, line 147 is "[email protected] number of worker threads in each server process.

User avatar
DougieLawson
Posts: 37604
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: PI file sharing server with remote login

Wed Dec 18, 2013 12:17 am

This is the stuff I removed

Code: Select all

# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
#<Directory />
#       Options FollowSymLinks
#       AllowOverride None
#       Require all denied
#</Directory>
#
#<Directory /usr/share>
#        AllowOverride None
#        Require all granted
#</Directory>
#
#<Directory /var/www/>
#       Options Indexes FollowSymLinks
#       AllowOverride None
#       Require all granted
#</Directory>
#
#<Directory /srv/>
#       Options Indexes FollowSymLinks
#       AllowOverride None
#       Require all granted
#</Directory>
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

secretreeve
Posts: 330
Joined: Mon Feb 20, 2012 8:39 am

Re: PI file sharing server with remote login

Wed Dec 18, 2013 12:20 am

Hmm i used "where is" to search for "<Directory />" and got [ "<Directory />" not found]

thats using sudo nano /etc/apache2/apache2.conf

User avatar
DougieLawson
Posts: 37604
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: PI file sharing server with remote login

Wed Dec 18, 2013 12:30 am

My install is a fresh install using apt-get install apache*

There must be a stray <Directory> directive somewhere. My RPi asks for a userid and password when I head for the http://pi.local/ page.

Try this:
cd /etc/apache2
grep -R -e 'irectory' *
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

secretreeve
Posts: 330
Joined: Mon Feb 20, 2012 8:39 am

Re: PI file sharing server with remote login

Wed Dec 18, 2013 12:35 am

i may have found the problem,

my sudo nano /etc/apache2/sites-enabled/000-default

only has the password file data in it for some reason.....well this is going to be fun trying to restore that entire file!

thanks, will post back when i get this sorted

secretreeve
Posts: 330
Joined: Mon Feb 20, 2012 8:39 am

Re: PI file sharing server with remote login

Wed Dec 18, 2013 12:43 am

Code: Select all

apache2.conf:# below, all located in the /etc/apache2/ directory:
apache2.conf:# * Configuration files in the conf.d directory are either provided                                                                              by other
apache2.conf:# ServerRoot: The top of the directory tree under which the server'                                                                             s
apache2.conf:# Do NOT add a slash at the end of the directory path.
apache2.conf:# AccessFileName: The name of the file to look for in each director                                                                             y
conf.d/localized-error-pages:#    <Directory "/usr/share/apache2/error">
conf.d/localized-error-pages:#    </Directory>
conf.d/security:#<Directory />
conf.d/security:#</Directory>
conf.d/security:# name to server-generated pages (internal error documents, FTP                                                                              directory
conf.d/security:#<DirectoryMatch "/\.svn">
conf.d/security:#</DirectoryMatch>
mods-available/dir.conf:          DirectoryIndex index.html index.cgi index.pl i                                                                             ndex.php index.xhtml index.htm
mods-available/autoindex.conf:# Directives controlling the display of server-gen                                                                             erated directory listings.
mods-available/autoindex.conf:# IndexOptions: Controls the appearance of server-                                                                             generated directory
mods-available/autoindex.conf:# default, and append to directory listings.
mods-available/autoindex.conf:# directory indexes.
mods-available/autoindex.conf:# IndexIgnore is a set of filenames which director                                                                             y indexing should ignore
mods-available/alias.conf:# We include the /icons/ alias for FancyIndexed direct                                                                             ory listings.  If
mods-available/alias.conf:<Directory "/usr/share/apache2/icons">
mods-available/alias.conf:</Directory>
mods-available/setenvif.conf:# a directory that does not include the trailing sl                                                                             ash.  This fixes a
mods-available/userdir.conf:        <Directory /home/*/public_html>
mods-available/userdir.conf:        </Directory>
mods-available/php5.conf:    # only in specific virtual host or directory
mods-available/php5.conf:    <Directory /home/*/public_html>
mods-available/php5.conf:    </Directory>
mods-available/disk_cache.conf:        # single directory (e.g. 32000 for ext3)
mods-enabled/dir.conf:          DirectoryIndex index.html index.cgi index.pl ind                                                                             ex.php index.xhtml index.htm
mods-enabled/autoindex.conf:# Directives controlling the display of server-gener                                                                             ated directory listings.
mods-enabled/autoindex.conf:# IndexOptions: Controls the appearance of server-ge                                                                             nerated directory
mods-enabled/autoindex.conf:# default, and append to directory listings.
mods-enabled/autoindex.conf:# directory indexes.
mods-enabled/autoindex.conf:# IndexIgnore is a set of filenames which directory                                                                              indexing should ignore
mods-enabled/alias.conf:# We include the /icons/ alias for FancyIndexed director                                                                             y listings.  If
mods-enabled/alias.conf:<Directory "/usr/share/apache2/icons">
mods-enabled/alias.conf:</Directory>
mods-enabled/setenvif.conf:# a directory that does not include the trailing slas                                                                             h.  This fixes a
mods-enabled/php5.conf:    # only in specific virtual host or directory
mods-enabled/php5.conf:    <Directory /home/*/public_html>
mods-enabled/php5.conf:    </Directory>
sites-available/default-ssl:    <Directory />
sites-available/default-ssl:    </Directory>
sites-available/default-ssl:    <Directory /var/www/>
sites-available/default-ssl:    </Directory>
sites-available/default-ssl:    <Directory "/usr/lib/cgi-bin">
sites-available/default-ssl:    </Directory>
sites-available/default-ssl:    #   With SSLRequire you can do per-directory acc                                                                             ess control based
sites-available/default-ssl:    #     directives are used in per-directory conte                                                                             xt.
sites-available/default-ssl:    <Directory /usr/lib/cgi-bin>
sites-available/default-ssl:    </Directory>
sites-available/default:        <Directory />
sites-available/default:        </Directory>
sites-available/default:        <Directory /var/www/>
sites-available/default:        </Directory>
sites-available/default:        <Directory "/usr/lib/cgi-bin">
sites-available/default:        </Directory>
sites-available/default:    <Directory "/usr/share/doc/">
sites-available/default:    </Directory>
sites-enabled/000-default.save.1:        <Directory />
sites-enabled/000-default.save.1:        </Directory>
sites-enabled/000-default.save.1:        <Directory /var/www/>
sites-enabled/000-default.save.1:        </Directory>
sites-enabled/000-default.save.1:        <Directory /var/www>
sites-enabled/000-default.save.1:               </Directory>
sites-enabled/000-default.save.1:        <Directory "/usr/lib/cgi-bin">
sites-enabled/000-default.save.1:        </Directory>
sites-enabled/000-default.save.1:       <Directory />
sites-enabled/000-default.save.1:       </Directory>
sites-enabled/000-default.save.1:       <Directory /var/www/>
sites-enabled/000-default.save.1:       </Directory>
sites-enabled/000-default.save.1:        <Directory /var/www>
sites-enabled/000-default.save.1:               </Directory>
sites-enabled/000-default.save.1:       <Directory "/usr/lib/cgi-bin">
sites-enabled/000-default.save.1:       </Directory>
sites-enabled/000-default.save.2:       <Directory />
sites-enabled/000-default.save.2:       </Directory>
sites-enabled/000-default.save.2:       <Directory /var/www/>
sites-enabled/000-default.save.2:       </Directory>
sites-enabled/000-default.save.2:        <Directory /var/www>
sites-enabled/000-default.save.2:               </Directory>
sites-enabled/000-default.save.2:       <Directory "/usr/lib/cgi-bin">
sites-enabled/000-default.save.2:       </Directory>
sites-enabled/000-default.save.3:       <Directory />
sites-enabled/000-default.save.3:       </Directory>
sites-enabled/000-default.save.3:       <Directory /var/www/>
sites-enabled/000-default.save.3:       </Directory>
sites-enabled/000-default.save.3:       <Directory "/usr/lib/cgi-bin">
sites-enabled/000-default.save.3:       </Directory>
sites-enabled/000-default.save: <Directory />
sites-enabled/000-default.save: </Directory>
sites-enabled/000-default.save: <Directory /var/www/>
sites-enabled/000-default.save: </Directory>
sites-enabled/000-default.save:        <Directory /var/www>
sites-enabled/000-default.save:               </Directory>
sites-enabled/000-default.save: <Directory "/usr/lib/cgi-bin">
sites-enabled/000-default.save: </Directory>
sites-enabled/000-default:        <Directory />
sites-enabled/000-default:        </Directory>
sites-enabled/000-default:        <Directory /var/www/>
sites-enabled/000-default:        </Directory>
sites-enabled/000-default:        <Directory "/usr/lib/cgi-bin">
sites-enabled/000-default:        </Directory>
sites-enabled/000-default:    <Directory "/usr/share/doc/">
sites-enabled/000-default:    </Directory>
[email protected] /etc/apache2 $
I made a backup when the server was actually functioning as it was meant to (before the password edits) so rolling back to that to start this bit again. will update with a new (what ever) post containing the above from the roll back tomorrow, its 1am and im up early so need some sleep hah.

thanks for stickign through this!

secretreeve
Posts: 330
Joined: Mon Feb 20, 2012 8:39 am

Re: PI file sharing server with remote login

Wed Dec 18, 2013 1:01 am

updated grup

Code: Select all

[email protected] ~ $ cd /etc/apache2
[email protected] /etc/apache2 $ sudo grep -R -e 'irectory' *
apache2.conf:# below, all located in the /etc/apache2/ directory:
apache2.conf:# * Configuration files in the conf.d directory are either provided                                                                              by other
apache2.conf:# ServerRoot: The top of the directory tree under which the server'                                                                             s
apache2.conf:# Do NOT add a slash at the end of the directory path.
apache2.conf:# AccessFileName: The name of the file to look for in each director                                                                             y
conf.d/localized-error-pages:#    <Directory "/usr/share/apache2/error">
conf.d/localized-error-pages:#    </Directory>
conf.d/security:#<Directory />
conf.d/security:#</Directory>
conf.d/security:# name to server-generated pages (internal error documents, FTP                                                                              directory
conf.d/security:#<DirectoryMatch "/\.svn">
conf.d/security:#</DirectoryMatch>
mods-available/dir.conf:          DirectoryIndex index.html index.cgi index.pl i                                                                             ndex.php index.xhtml index.htm
mods-available/autoindex.conf:# Directives controlling the display of server-gen                                                                             erated directory listings.
mods-available/autoindex.conf:# IndexOptions: Controls the appearance of server-                                                                             generated directory
mods-available/autoindex.conf:# default, and append to directory listings.
mods-available/autoindex.conf:# directory indexes.
mods-available/autoindex.conf:# IndexIgnore is a set of filenames which director                                                                             y indexing should ignore
mods-available/alias.conf:# We include the /icons/ alias for FancyIndexed direct                                                                             ory listings.  If
mods-available/alias.conf:<Directory "/usr/share/apache2/icons">
mods-available/alias.conf:</Directory>
mods-available/setenvif.conf:# a directory that does not include the trailing sl                                                                             ash.  This fixes a
mods-available/userdir.conf:        <Directory /home/*/public_html>
mods-available/userdir.conf:        </Directory>
mods-available/php5.conf:    # only in specific virtual host or directory
mods-available/php5.conf:    <Directory /home/*/public_html>
mods-available/php5.conf:    </Directory>
mods-available/disk_cache.conf:        # single directory (e.g. 32000 for ext3)
mods-enabled/dir.conf:          DirectoryIndex index.html index.cgi index.pl ind                                                                             ex.php index.xhtml index.htm
mods-enabled/autoindex.conf:# Directives controlling the display of server-gener                                                                             ated directory listings.
mods-enabled/autoindex.conf:# IndexOptions: Controls the appearance of server-ge                                                                             nerated directory
mods-enabled/autoindex.conf:# default, and append to directory listings.
mods-enabled/autoindex.conf:# directory indexes.
mods-enabled/autoindex.conf:# IndexIgnore is a set of filenames which directory                                                                              indexing should ignore
mods-enabled/alias.conf:# We include the /icons/ alias for FancyIndexed director                                                                             y listings.  If
mods-enabled/alias.conf:<Directory "/usr/share/apache2/icons">
mods-enabled/alias.conf:</Directory>
mods-enabled/setenvif.conf:# a directory that does not include the trailing slas                                                                             h.  This fixes a
mods-enabled/php5.conf:    # only in specific virtual host or directory
mods-enabled/php5.conf:    <Directory /home/*/public_html>
mods-enabled/php5.conf:    </Directory>
sites-available/default-ssl:    <Directory />
sites-available/default-ssl:    </Directory>
sites-available/default-ssl:    <Directory /var/www/>
sites-available/default-ssl:    </Directory>
sites-available/default-ssl:    <Directory "/usr/lib/cgi-bin">
sites-available/default-ssl:    </Directory>
sites-available/default-ssl:    #   With SSLRequire you can do per-directory acc                                                                             ess control based
sites-available/default-ssl:    #     directives are used in per-directory conte                                                                             xt.
sites-available/default-ssl:    <Directory /usr/lib/cgi-bin>
sites-available/default-ssl:    </Directory>
sites-available/default:        <Directory />
sites-available/default:        </Directory>
sites-available/default:        <Directory /var/www/>
sites-available/default:        </Directory>
sites-available/default:        <Directory "/usr/lib/cgi-bin">
sites-available/default:        </Directory>
sites-enabled/000-default:      <Directory />
sites-enabled/000-default:      </Directory>
sites-enabled/000-default:      <Directory /var/www/>
sites-enabled/000-default:      </Directory>
sites-enabled/000-default:      <Directory "/usr/lib/cgi-bin">
sites-enabled/000-default:      </Directory>

secretreeve
Posts: 330
Joined: Mon Feb 20, 2012 8:39 am

Re: PI file sharing server with remote login

Wed Dec 18, 2013 9:47 am

DougieLawson wrote:To get password protection you'll need to add these directives

Code: Select all

<Directory /var/www>
Options -Indexes
AuthUserFile /some/other/directory/webpasswd
AuthName "Password Required"
# NOTE: basic authentication has no security
AuthType Basic

require user usernamehere
</Directory>
And create /some/other/directory/webpasswd with

Code: Select all

htpasswd -c /some/other/directory/webpasswd usernamehere
NOTE: That password file MUST NOT be anywhere in /var/www or in any subdirectories under /var/www.

See: http://httpd.apache.org/docs/2.2/howto/auth.html for details. I'd also recommend using AuthType Digest to make it more secure (depending on your needs).
just want to double check, this gets added to the 000-default file that already exists correct? its not its own file with its own name?

Gdog3141
Posts: 1
Joined: Wed Dec 18, 2013 11:33 am

Re: PI file sharing server with remote login

Wed Dec 18, 2013 11:37 am

Hey secretreeve, cool project. I want to do the same, but I haven't started yet. Have you looked into this Barracuda Drive thing?
http://barracudadrive.com/RaspberryPi.lsp

secretreeve
Posts: 330
Joined: Mon Feb 20, 2012 8:39 am

Re: PI file sharing server with remote login

Wed Dec 18, 2013 11:53 am

had not seen that to be honest, looks like it might be missing the remote access though.

if your looking to log into the pi from another network, you will need a website name and the ability to direct to it, i followed this guide http://www.instructables.com/id/Host-yo ... ur-server/ to get the initial server setup, then i removed the index.html file from the /var/www directory to start showing the files i have in there.

the no-ip service in that guide is free, the software for it on the pi sends an update to no-ip with your current IP address (guessing you dont have a static ip from your service provider) and you can register a free domain with no-ip, so when people go to www.example.no-ip.biz it takes you to your network, you then need to setup port forwarding on your router so the connection knows where to go to.

User avatar
DougieLawson
Posts: 37604
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: PI file sharing server with remote login

Wed Dec 18, 2013 12:47 pm

Here's my apache2.conf (I've stripped out the comments & blank lines)

Code: Select all

ServerName pi
Mutex file:${APACHE_LOCK_DIR} default
PidFile ${APACHE_PID_FILE}
Timeout 300
KeepAlive On
MaxKeepAliveRequests 100
KeepAliveTimeout 5
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}
HostnameLookups Off
ErrorLog ${APACHE_LOG_DIR}/error.log
LogLevel warn
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf
Include ports.conf
<Directory /usr/share>
        AllowOverride None
        Require all granted
</Directory>
AccessFileName .htaccess
<FilesMatch "^\.ht">
        Require all denied
</FilesMatch>
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent
IncludeOptional conf-enabled/*.conf
IncludeOptional sites-enabled/*.conf
And my 000-default.conf (again stripped down to the bare minimum)

Code: Select all

<VirtualHost *:80>
        ServerAdmin [email protected]
        DocumentRoot /srv/www/httpi
        <Directory />
                   Options Indexes FollowSymLinks MultiViews
                   AllowOverride ALL
                   Order allow,deny
                   allow from all
                   AuthUserFile /etc/apache2/var/www
                   AuthName "Password Required"
                   AuthType Basic
                   require user mainframe
        </Directory>
        ScriptAlias /cgi-bin/ /srv/www/httpi/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>
        ErrorLog ${APACHE_LOG_DIR}/error.log
        LogLevel warn
        CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

secretreeve
Posts: 330
Joined: Mon Feb 20, 2012 8:39 am

Re: PI file sharing server with remote login

Wed Dec 18, 2013 1:38 pm

i dont know whats going on, but on the roll back the port was open now its closed.

it seems like when those changes are made its closing the port and thats whats causing the connection reset?

because i basically deleted everything in the apache2.conf and 000-default files pasted your data in, created the directory for the password file, created the password file and the ports now closed and getting connection reset again.

Return to “Networking and servers”