Hot answers tagged

14

Normally, you do not need any server just to view raw HTML files, even if they reference other files, CSS and JavaScript. Simply double click on any file and it will open with the default browser of your machine from the local file system. However you may need to check if your static content has no absolute references to other files or other resources (<...


11

Since your site is static, one solution is to use CloudFlare, because it can still serve cached pages if your site goes down (with proper configuration). It will be transparent if there is an issue. And keep a copy of your site on your laptop or on a memory stick if you can't use your laptop. If all goes wrong, you will still able to finish your ...


7

From https://ma.ttias.be/chrome-force-dev-domains-https-via-preloaded-hsts/ There's a proposal to add the .localhost domain as a new standard, which will make lives of developers way easier. It would mean site.localhost and everything at *.localhost would automatically translate to 127.0.0.1, without /etc/hosts or dnsmasq workarounds. Refer the RFC here.


6

OS is winxp sp3. The Apache Friends download page for XAMPP states that Windows XP is no longer supported by the application. However, an alternative link is given for this OS. Windows XP or 2003 are not supported. You can download a compatible version of XAMPP for these platforms here. It seems that the latest version of XAMPP that is compatible with ...


6

From the Wikipedia entry for .localhost (TLD): As a top-level domain, the name has traditionally been defined statically in host DNS implementations with address records (A and AAAA) pointing to the same loopback addresses. However, as you have found, it would appear that it's just Chrome and later versions of Opera (possibly the WebKit browsers, so ...


6

If the website is HTML and CSS only, You don't need a host. Just throw it on the USB stick that that you're going to use for the redundant WAMP environment and run it from whatever machine you plug it in to. If you're worried about losing the USB stick, the web host would be a suitable backup.


5

You can simply open the internet page locally and display it in your browser. If you even want to show a different domain name, you can use XAMPP to open a local webserver. Host your website there and point the domain to your localhost on your maschine by appending the following line to your hosts file on your system: 127.0.0.1 www.presentation.mydomain....


5

You could host the static content using Amazon S3. See http://docs.aws.amazon.com/AmazonS3/latest/dev/WebsiteHosting.html for a guide as to how. Basically you sign up for an AWS account, upload your website into S3, and can then access it via a url like <bucket-name>.s3-website-<AWS-region>.amazonaws.com. You can also create a custom domain for ...


4

So many overly-complicated answers. The website is HTML and CSS only (no DB), and currently resides on my shared hosting account. You do not need Apache You do not need XAMP (or similar) You do not need cloudflare, dropbox or any other 3rd-party service. (github? for a presentation? please.) All you need is a portable storage device. USB key, external ...


4

Activate mod_rewrite, and put this in a .htaccess file or a <Directory> directive: RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-l RewriteCond %{REQUEST_URI} !^apps/ RewriteRule (.*) apps/$1 What it does: The first three lines check if the requested URI refers to an actually existing file, ...


4

If you are using Git for version control of your site... (not to judge... but you kinda should be if it's an important project!) You can host your entire website on Github's "project pages". (aka Github Pages) It's really simple to just git push your site code there. Basically you push to a branch called gh-pages and your site will automatically publish, ...


2

Keeping two databases in sync is known as "replication". MySQL supports database replication. In fact one of their use cases seems to match yours pretty well: Long-distance data distribution - if a branch office would like to work with a copy of your main data, you can use replication to create a local copy of the data for their use without requiring ...


2

Yes, you can do this. Assuming you are using Apache then you can do something like the following using mod_rewrite in either the server config or per-directory .htaccess file: RewriteEngine On RewriteCond %{HTTP_HOST} =www.example.com [NC] RewriteRule ^/?foo$ /bar [R=302,L] This will redirect http://www.example.com/foo to http://www.example.com/bar, but it ...


1

Hm... try to put this code into your host file. <Directory "/path/to/your/dir"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Allow from all Require all granted </Directory>


1

I just went through this trying to set up my old XP machine with XAMPP. Do not use the 1.8.2 downloads from Sourceforge: they are either corrupt or invalid, or they come with the files but no executable installer. Use this 1.8.1 link instead, which comes with the installer: https://sourceforge.net/projects/xampp/files/XAMPP%20Windows/1.8.1/ If you need ...


1

To make sure your website is available, you can use round-robin DNS. You can order two hosting packages with two different IP's and use round-robin DNS for load balancing. If one IP is offline, the traffic will be redirected to the other. The other way is with CloudFlare. You can use CloudFlare + round-robin DNS for extra reliability. CloudFlare is a free (...


1

If you have an internet connection with static IP address, you can do it. First you have to create an entry in the Apache's VirtualHost on xampp with the domain name, and port. Here is a tutorial on creating the vhost entry. http://httpd.apache.org/docs/2.0/vhosts/examples.html You can then add the a record with the value of the static public IP in ...


1

WordPress only prompts for FTP credentials when the web server process does not have the essential file and folder permissions. You're need to make sure that your folders are using 750, or 755 and your files 644 or 640. SOURCE All directories should be 755 or 750. All files should be 644 or 640. If your folders and files are set correctly ...


1

Where is your website directory on your local filesystem? My guess is that you've probably put the files in the wrong place. When you request <host>/xampp/ (a URL) it's actually serving the files from the /xampp/htdocs directory on the local filesystem (this is the default location at least). So, in order to successfully request <host>/xampp/...


1

... however they lose the page that they were going to. I'm not sure what you mean by this - they shouldn't "lose" anything? However, the URL in the address bar will not be updated - if that is what you are implying? An Apache Alias converts a URL to a server-side filesystem path (usually to allow access to files located outside of the document root) - it ...


1

You mount the drive as you would any other. This will usually make the files on it available via /Volumes/Something/ on your local file system. You can then specify that location as a DocumentRoot or Alias in your Apache configuration. Alternatively, you can create a symlink to it from somewhere under your existing DocumentRoot (assuming you enable ...


1

There are hundreds of variations to development workflow and what you use should be tailored to what you need and how you work. XAMPP offers the ability to develop locally. It doesn't provide an ability to push those changes to a live server or sync between the two. Many text editors will provide you with the ability to push changes live (such as Sublime ...


1

And, last but not least, make screenprints of all the webpages you were planning to display. Hey, it's worked for me. Put them in Power Point or just organized by name/sequence. Murphy's Law has no boundaries!


1

I think you can write them onto a notepad document, save as foo.html or something along those lines, and open, it won't rely upon the internet (admittedly I'm not sure how to fit the CSS in there I've never made to much html, or any CSS so you can try not sure how it will turn out).


1

Browsers offer to download files based on two headers: Content-Type Content-Disposition I use a command line tool called curl to check headers on a website. curl -s -D - 'http://example.com/' | head -n 20 If you don't want your pages to be downloaded, then the Content-Type should be set to text/html or text/html;charset=UTF-8 and there should be no ...


1

Broadband Outrages It's doable but one of the problems is that home connections are not as reliable or stable as you may think. DNS issues occur very regularly on home broadband as well as other problems, also your IP may change (Dynamic) and this causes all types of problems with domains. Dynamic IP If your IP changes then your going to need a Dyn ...


1

How do I set up cPanel so that I can "redirect" subdomain folio.site.com to my other locally hosted website? As you likely already suspect, this wouldn't really be a "redirect", it's pointing a subdomain to an IP address, which is done with an A record. A CNAME would be used to point to a hostname, not an IP address. To do this in cPanel, edit the DNS Zone ...


1

I'm sorry to inform you, but your steve-t-green domain loads an Index of / and within it it's your website/ directory. Therefore to access your photo I added that directory in the url like this: http://steve-t-green.com/website/albums/1.jpg Not to mention it's a jpg, not a png. Also, you might want to configure the apache/conf/httpd.conf file and add "/...


Only top voted, non community-wiki answers of a minimum length are eligible