Build file server to upload files from IPhone and Mac using Raspberry Pie - iphone

Is it possible to build a File storage server using Raspberry Pi 3 to upload files from apple device using Wifi?

Yes, I believe so. Use nginx or Apache to host it and have a PHP or JS script that accepts files from an HTML form and saves them.
For me, Apache is easier to use, but I prefer nginx as it is much faster.
Once you have the server and HTML/PHP/JS set up just navigate to your Pi's IP in Safari. There you go!
You do, however, have limitations. Saving files to an external flash drive is your best option, unless your Pi is only being used as a server. In that case, make sure you chown the folder where you would like to save the files to the user that the server uses (www-data for nginx, I think it's the same for Apache)
If I was unclear about anything, just let me know!

Related

Portable webserver for static site in Ubuntu

I'm working on some pre-compiled website and I have a web-development project with only a static files in it (HTML, CSS, JS, images, fonts, etc).
In order to test it on development machine I need a web-server capable of serving static files over HTTP. I don't want to use some heavy artillery like Vagrant and nginx/apache. I'm looking for a web-server that can be invoked from the command line with a simple command and/or that have a configuration file stored in the project, not in the system.
What are my options in the field of portable web-servers? I need it to run on Ubuntu.
I've heard about Python's SimpleHTTPServer and PHP's built-in webserver. Are there any other alternatives?
I would not dismiss Nginx. Nginx is quite lightweight and very good at serving static data.

Create server panel like cPanel

I have a VPS, Cent OS 6.4 64bit
I want to create a panel (like cPanel) and I want to make it accessible by opening a port (serverip:2082 for example). I have created php files of my own panel but i don't know anything about linux services.
What type of code must I make and where can I put it?
Thank you in advance!
no offense, but if you really don't know about linux service you are 99% away from creating your own panel. You first need to understnad that Cpanel not only modify system files to allow hosting and managing database, but it also do all these without playing with system security.
But to start you need a web server that will host your Cpanel. I prefer it to be different from your webserver that host your website, reason? What if your default apache is inaccessible or crash, your panel will crash with it. Then you need to learn Mysql, or database you want to manage through panel, DNS binding, Name servers, regular expression to manage text files of configuration etc.
I know all these because I already built a Cpanel like application, and know it is not easy job especially with this level of question you asked.

Downloading/Uploading a file from a sftp server on the iphone

I need to connect to a sftp/scp server download a file, edit it and then reupload it.
As far as i know the SKD itself doesn't give you the ability for secure connections via ftp.
Any Ideas?
There we go: http://www.chilkatsoft.com/ssh-sftp-objc.asp
Does everything and a bit more. It's commercial but it doesn't really matter in our case as developing our own libssl2 wrapper would take weeks and weeks.
https://github.com/karelia/libssh2_sftp-Cocoa-wrapper
I have not tried it (yet...), but it's from the same person who made ConnectionKit. It's SFTP (I'm not sure if they mean secure ftp or ssh file transfer protocol)

iPhone HTTP Server

Can someone give me simple code to help with creating an HTTP server for the iPhone. Something simple with much documentation would be appreciated. Anything you have please share.
There are sample codes from Apple and open source community such as cocoahttpserver TouchHTTPD.
Here's a summary blog
Another open-source HTTP server for iPhone is the lightweight GCDWebServer which is built on top of Grand Central Dispatch. It's only a few source code files and offers a simple and extensible API.
If you're unfamiliar with network programming your best bet is to first read Beej's Guide to Network Programming and then read the HTTP 1.1 spec before you look at source code (as you should have an understanding of the protocol before you start looking at implementations).
A simple Google search turned up cocoahttpserver and iSpit. Otherwise, you could download Apache and look at its source code, but that's not exactly a simple implementation.
It is possible to run a simple file server on iPhone/iOS.
I was able to use this method successfully. Here are the steps to create a simple file server which works on http protocol.
1. Install TestFlight app for iOS
2. Install iSH app from the Apple store or side load it from their website, as this app might not be available in the store depending on your country. I tried it from india in May 2020, and the app was not available in the store. So i did side load it from their website.
3. With iSH app, one has access to linux kernel of the iPhone. I did use a simple http server module from python and executed it on the linux shell.
4. Command to run the python based server on iPhone :
Python -m http.server 8080
5. Access the file server using the local ip that’s assigned to the iPhone in the network you are connected to. That means, if iPhone is connected to a WiFi SSID, depending on whether the router is configured to use static IP address assignment based on MAC address or using DHCP protocol, your iPhone will have an internal IP assigned by the router.
6. Command to access the file server :
http://192.168.1.3:8080 - modify the address depending on IP address of the iPhone and the port that server running on iPhone is configured to use. Paste this in a browser - one should be able to see the files listed in the directory where the server is running in.
Hope this was clear enough, for running a simple http based file server on iPhone using http.server module in python, over linux shell of the underlying kernel, using iSH.

Portable USB Webserver

I have project that I'm working on that is going to require a webserver. The webserver will be used to remotely control a presentation using a mobile device.
I see there are quite a few options out there and I'm wondering if someone could provide some recommendations.
My criteria include:
Portable, fits on a USB key
Easy to
run. A user can just click on an
icon, or ideally it would include an
autorun command.
Open Source. I would prefer something licensed under the GPL or similar.
Runs a dynamic server-side language. I see that most have PHP which works perfectly, but I'm open to other languages.
Cross platform if possible.
Right now I'm leaning towards XAMPP, but I would love to hear some suggestions.
XAMPP is perfect for this.
I recommend XAMPP, so I think you are on the right track.
Have not used this, but it looks like it would be right up your alley:
http://www.blackdot.be/?inc=apache/httpserveronusb
Supports perl + php by default.
From the page:
If you are a web developer I'm sure you have had that moment where you went:
"If only I had a web server handy right now!"
Then HTTP Server On USB is something for you! HTTP Server On USB is a fully configured web server that runs from your USB-Key. Plug it in and off you go!
It can be use to show of a website to a costumer, share files with your friends (both ways thanks to DAV) or simply impress people but acting all geeky!
Are you special and do you depend on exotic 3rd party module?
Just drop them in the module folder and edit the configuration file!
Features:
Management Application
Apache 2.2.11
mod_deflate
mod_ssl
mod_security
mod_perl
PHP 5.2.8
ActiveState Perl 5.10
Requirements:
Windows 2000, Windows XP or Windows 2003
256mb USB-key
I have had no luck with XAMPP Lite or USBWebserver. What is currently working really well is Server2Go. I could never get XAMPP to run and USBWebserver would not allow me to install Drupal or Wordpress.
With Server2Go, I was able to install Drupal 7 on the USB Flash Drive, however, only with SQLite. I did need to go to the php folder and copy and rename the production-php.ini file to php.ini. There is a php.ini setting that needs to be set for the MySQL DB to be recognized. It is running well with SQLite for Development purposes though.
LAMPPIX - looks like not up to date, but should do the job.
I would suggest Apache, pretty lightweight and has everything you'll need (PHP).