Using index.html for Hugo file serving - server

I am able to serve a Hugo web site on port 1313. I don't have access to port 80, but I can write index.html and the public_html directory. How do I configure Hugo so that my site is served from mydomain.com instead of mydomain.com:1313?

You don't need to run as a server. Build the site by just running command "HUGO". This will generate a public or output folder. Copy the contents of the public folder and past to the publich_html directory of your hosting. This will work like normal HTML pages.
For the development purpose only we need to use as "HUGO SERVER"

Related

can't connect local site to Iphone with XAMPP

Ive build my site on wordpress and using xampp
i want to test my new dev site on my remotely on my iphone and ipad via wifi
They're both connected to wifi
When i search iphone http://000.000.0.00 or http://000.000.0.00:80, :8080
it comes up with a link to a folder , which is my true path
when i click on this next sub folder , i loop back round to 127.0.0.1
As i guess iphone doesn't know where to find my site contents
I've tried renaming my wordpress site the with the http://ipaddress, :80, :80;80
ad it comes up with an error
ive found in my XAMPP index.php file
The footer seems to send me to 127.0.0.1/dashboard/
i can view this from my iphone
i've tried changing that footer on index.php to my site path
As well as deleting the file all together
Deleting the file allowed me to access more folders but not into the subfolder where my site remains
I've read through questions and tutorials but can't seem to find a solution
i was wondering if i've missed something or if i need to configure files in such a way , maybe to this index.php for XAMPP itself to get it to point at my site as a default
Thank you in advance
Check if your files are in htdocs or you have given correct path to your working directory in your httpd.conf file.
If the directory is correct and you have run your php pages already, I suggest you use ngrok for remote connection to your localhost.
https://ngrok.com/download
it is simple to use.
to run it go to the directory of ngrok in cmd and type ngrok http 80 while your XAMPP servers are running. It will provide a link that could be accessed through internet by any device.

Deploying a Static website on Server

I am trying to built a static website using godaddy server. I created a folder say Manage inside public_html in which there is an index.php. Now when I am trying to open this page on browser with URL "www.mysite.com/Manage/index.php" It is showing error, File not found, 404 error. So what possible error I might be making?
There could be a few reasons. If you are using an RHEL-based distribution for your server, you need to edit the master Apache configuration file /etc/httpd/conf.d/userdir.conf and change two things:
Change UserDir disabled to UserDir disabled root
If #UserDir public_html is commented change it to UserDir public_html
This tells Apache that the directory containing each user's html files is a subdirectory of their home directory called public_html.
You may also need to change the permissions of your user directory and your public_html directory to allow Apache to read and execute inside them. To do this, run the following commands:
sudo chmod o+x /home/myusername
sudo chmod o+rx /home/myusername/public_html
Restart Apache and see if it works.
The source for this knowledge is not my brain. It comes from the wonderful course at Washington University in St. Louis CSE 330 Rapid prototype development.
At first look to error.log. If you use nginx find in /var/log/nginx, if httpd in /var/log/httpd.
And what do you mean about "static"? PHP preprocessor generate html from *.php files, so you index.php is not static.
For this case you need to setup LAMP stack.

Where do I put cpanel backup files on www folder?

I am using lamp to test a cpanel backup on ubuntu 16.04.
The website is a prestashop 1.4 bunch of folders.
enter image description here
As you can see in the image, there are many folders within folders. What do I put on www folder to show up on localhost?
I added the "public html" folder in it but it says 404 not found.
Assuming you have everything routed properly in php and you have your config setup accordingly, you should put all of it in your www folder.
Put all of your files in www, then start your webserver and try to open products.php (per example) in your browser.

Symfony: why is my main page example.com/web instead of example.com (as it should be?)

My directory tree looks something like this:
public_html
example.com(containing symfony files)
lib
web
app
etc...
example.net
example1.com
example1.net
When I access my site via example.com it just shows my directory tree under the folder example.com, instead of routing to my actual homepage. How do I fix this?
You should place all files (except the web directory) in the directory directly above the web directory.
Then create a symlink public_html to your web directory, or add the files to your public_html, and then in your ProjectConfiguration call $this->setWebDir(realpath('../public_html'));

.htaccess file for Uploading a Zend Framework Project on 1and1

The problem I have is that I am trying to put a Zend Framework web application online and while it works perfectly on my localhost, it has a lot of errors online. I know that there are certain things required for a Zend website to work.
I need the document root to be serwano.com/staging/fbr
I need php5
I need mod rewrite on
I need the document root to be serwano.com/staging/fbr.
I have a testing website with the following folder set up:
/webroot(serwano.com)
/staging
/other test site
/other test site
/fbr
/application
/library
/public
I need help determining what the appropriate .htaccess file would be so that my Zend Web App will work.
You can figure the webroot for a domain to point to any folder insider your FTP upload directory, thus you can do
+ userhome
|- serwano.com
|-- staging
|-- test
|-- production
Then go to your 1&1 control panel and create three subdomains for serwano.com. There should be an option to point each subdomain's webroot to the appropriate folder, e.g.
staging.serwano.com // point it to the staging folder
test.serwano.com // point it to the test folder
www.serwano.com // point it to the production folder
Whether you can use .htaccess and mod_rewrite depends on how your webhosting package is configured. Contact 1&1 (prepare for pain) to find out if that is possible. If it is not possible, Google has a number of results for Zend Framework without .htaccess. You do not need mod_rewrite, nor .htaccess. This is just recommended.