Is it possible to make apache server on my pc /same as I working with vs code/ setup as my vs code live server?
Like the live server extension, when I save /ctrl+s/ the browser page refresh it.
The vs code live server extension is useless.
I created a website /html, css, js/ which working perfect in Live Server.
When I uploaded to the server the website is useless.
I have to start again from the beginning. More than a week work landed in the trash.
Apache, because most of the servers are apache, and I do not want to throw a week in the trsh again.
I am study html, css, js as my hobby. I am a beginner. I am not working as programer, and not this is my target. Just study for fun.
Related
Is there a way to set up (extension, etc...) Visual studio code to auto-refresh browser (Firefox Dev, Chrome Dev) as soon as the file I am working on is saved? (Like Live Server extension)
I am working with local installation of Apache (Yes, I am working on WordPress :)
Using this tutorial from youtube you will install the Live Server VSCode extension for use with html files. However, you will most likely (although you haven't mentioned) be using PHP or other languages because apache supports it. For this, use this tutorial from GitHub. It installs a browser extension (compatible with chrome/chromium-based/firefox browsers) that connects to a server instance and serves the reload function to that webserver. This does NOT install a web server (in this case it shouldn't matter). If you follow the tutorial, it should be really self-explanatory.
I install prestashop 1.7.5.1 (the final version) in my local server (in wamp server - Apache 2.4.37 - PHP 7.2.14 - MySQL 5.7.24). My front office is ok, but all pages in my back office have problems. For example, in the picture below, My computer is not connected to the Internet.
but when I connect my computer to the internet my back office all is ok as shown in the picture below:
as if jquery or css is not loaded properly in my back office (when My computer is not connected to the Internet).I want work offline on my shop.
Please help me, many thanks.
Remember Prestashop use Bootstrap Framework, if you are offline the CDN wont receive the correct communication, you can see the result
You can try to use the Maintenance mode, to work offline.
This comes because of Prestashop backoffice use some external files of css and images.
To work offline you installed it in your website admin directory.
You can find those external link in your css admin file your_directory/admin_folder/themes/default/css/admin-theme.css
I am working on a web site that I worked heavily on a couple of years ago but only maintained since. It was recently migrated to another server. The new server uses ZendFramework version 1.12.20 on Apache (httpd=2.4.6-88.el7.x86_64).
There seems to be a weird bug where instead of using the URL of an image, it sends data:image content. Unfortunately the data:image is of an old image icon instead of the replacement icon. If I go directly to the URL of the image, it also still shows the old image. So it seems like a caching problem.
I've tried clearing the web browser cache and restarting the web server. There are no image files in /usr/local/zend/library/Zend/Cache and /usr/share/php/Zend/Cache. What will clear the Zend or Apache cache?
I have just successfully deployed Quercus on Glassfish 4.1. I tested in the browser
http://localhost:8080/quercus-4.0.39/ and saw this:
Congratulations! Quercus™ Open Source 4.0.39 is interpreting PHP
pages. Have fun!
Then ran Netbeans Tools > Options > PHP > Activate PHP Support
It worked. I now see this:
So I made 3 tests:
I ran a php page in an html application but instead of displaying the page it prompts a download box to open in Notepad
I created a new PHP project with below configuration:
But when I run the app with above configuration I receive this error:
Firefox can't establish a connection to the server at localhost.
So I tried with a third test with other configuration:
When I run this third test I get a HTTP Status 404 - Not Found error on GlassFish server.
What am I doing wrong? Thank you!
The problems with your tests are:
PHP needs to be interpreted by a web server. Your browser doesn't know what to do with a PHP file, so it just treats it like a file rather than a page to render. Apache is the most common and easiest server to do that with, GlassFish is unnecessary and probably not the best choice for PHP.
In this test, you are trying to visit a web server which doesn't exist. You don't have any server that listens on port 80.
Here, GlassFish is reporting that it can't find the resource you requested. Have you made sure to put your PHP project in the right directory for Quercus (like in step 4 of your documentation link) and made sure you're visiting a valid URL?
I think the best thing for you to do is move away from Quercus. The latest version of it is very old and implements an old version of PHP (version 5, whereas the latest is 5.6). Looking at the official website, the project appears to be dead, with broken links and very old documentation.
I would suggest you investigate installing a WAMP (Windows, Apache, MySQL, PHP) or LAMP (Linux, Apache, MySQL, PHP) stack. There are lots of very easy installers for this approach which will help you get up to speed and a lot of helpful tutorials and documentation.
For those who using tomcat, below are the steps :-
Right click your project --> properties --> Run Configuration --> For Run As, select PHP Built-in Web Server
Go to Tools --> Options --> PHP tab --> in Php 5 interpreter, browse the correct location for php
Then it should works !
In my case , my php is in /usr/bin/php7.0, so I put the path in Php 5 interpreter.
I'm completely new to this, so please forgive me.
What I have right now is a Play application that, when I run play run on my personal Mac the site launches on localhost:9000 and everything works fine.
I also have a server running CentOS that tells me to "add content to the directory /var/www/html/" when I navigate to it's IP, but I don't understand how I can do that with a Play application? It's not like I have a bunch of HTML files I can just put there?
So my question is, what steps do I need to take to make it so if I go to the IP of my server, it takes me to the website I made and that is currently stored on my Mac?
You need to configure Apache as a "proxy" to your Play application (that's why you won't need to put anything into /var/www/html/).
Your application code can be uploaded anywhere you want on the server. It will need to be started on the server (with play start for example) and Apache will "forward" requests to the running Play application.
You can look at the Play documentation in the "Deploy your application" section :
"Deploying your application" (general recommandations) : https://www.playframework.com/documentation/2.6.x/Production
"Set-up a front-end HTTP server" (explain how to deploy Play behind Apache or Nginx) : https://www.playframework.com/documentation/2.6.x/HTTPServer