Vagrant and wordpress not working - css

Recently I have started using vagrant for Wordpress development.
The installation process and everything else went well. But when i try to access the page I get to see this:
enter image description here
It also loads really slow. Any ideas?

To be able to resolve salesacademie.dev, you will need to add the name to your hosts file. The line you need should look something like
salesacademie.dev 127.0.0.1
With that change, you should be able to download the assets (and the site) using that name assuming that vagrant's port forward is for port 80 (the standard http port).
Alternatively, you can reconfigure your Wordpress to not use the name salesacademie.dev but 127.0.0.1 instead. Then, you don;t need to edit your hosts file. However, you will not be able to run several websites concurrently on your vagrant server then.

Related

IIS - Create a local host name and use it

I'm new to IIS and I'm trying to use a local hostname to differentiate my web projects. Basically, what I want is to do something like:
http://myproject.dev
and access it directly via the web.
Normally, with an Apache server, I would create a virtualhost and I would add an entry in my hosts file.
So, I tried to do the same with IIS. I created a a website as follows:
In my hostfile, I then added an entry:
127.0.0.1 myproject.dev
However, when I type the address, I'm redirected to my IP Address and I can't see the website.
Am I missing something?
Edit 1:
aha, I got it, it is host file issue, just remove:
127.0.0.1 localhost
or comment it because it make everything go back to 127.0.0.1
and write yours like this:
127.0.0.1 myproject.dev
You just have to create a folder in c: --> inetpub --> wwwroot than just type localhost/yourprojectfolder..

Trying to run a local website

I can get a website to run locally on "localhost" but I have more than one website I want to run locally and trying to set one up as dev.dfwcraftbeer but for some reason it doesn't work. I get "ERR_NAME_NOT_RESOLVED" from Chrome. Here was my process for setting it up:
"add website"
site name = "dev.dfwcraftbeer"
Physical Path = "C:\inetpub\wwwroot\dfwCraftBeer\dfwCraftBeer"
Binding = "http All Unassigned port 80"
host name = "dev.dfwcraftbeer.com"
I'm using IIS on my windows 10 laptop.
Why will it not come up? What am I doing wrong?
It sounds like you need to edit your host file. So that that domain name will resolve to your local machine. Just add your domain name dev.dfwcraftbeer.com to the hosts file and point it to 127.0.0.1. See the link to find out how to do it.

MAMP Start Page Only Shows Index

I'm trying to install Wordpress on MAMP using this tutorial. When I start the MAMP server and go to the MAMP startup page, I see this index instead of a GUI. As a result, I can't access the PHPMyAdmin GUI (despite the PHPMyAdmin link) to create a database for Wordpress. Does anyone know what I might be doing wrong? I'm running OSX 10.9.5.
Try that url to access phpmyadmin
http://localhost:8888/phpmyadmin/
This is the directory listing that Apache provides in some cases. When a folder is requested, Apache looks in a folder for a file name matching the DirectoryIndex directive, which are often files such as index.php, index.html, home.htm, and so on. Since none of those exist here, the directory listing is shown.
Basically, something isn't right here with your MAMP install; either this URL is not designed to be accessed by you ever or your installation is incomplete. First, try loading http://localhost:8888 directly and see if that works any better for you. Failing that, I suggest you make a backup of any MAMP related files (databases, web pages, or configuration changes) and reinstall. One possible cause of this is if the MAMP package is not installed to /Applications/
In short, when you're using an all-in-one package like MAMP this shouldn't happen. You say that when you uninstalled and reinstalled that fixed the problem which is what I would have suggested anyway. It seems something went wrong with the installation and that should (and did) fix it.
I add the solution that helped me in the similar situation just in case someone later will face the same problem when after the Wordpress has been installed, a browser just show "Index of/" instead of the required site.
Check the following points:
There is 'index.php' file in the root folder of your project. (web server tries to open exactly this file).
If the file actually is located there, check the configuration of your web server. For example in my case my web server is Apache 2.4. After I added the directive "DirectoryIndex index.php" in the Apache configurations file (thereby saying to the server which file it should open if it received the address of the root folder) my problem was solved.

Visit Nginx sites-enable without domainname in place

I was wondering, I regularly set up a new Drupal site in Nginx, I download the files, get the database in place and then.... I wait... for the DNS to resolve because I have no idea how to access the site without going through the domain name as stated behind "server_name".
Does anybody know how to access all the sites in sites-enabled without using a proper domain name?
The simplest way is to resolve domain name to IP locally. You can use hosts file for it. Just edit /etc/hosts file if your home OS is Linux, or C:\Windows\system32\drivers\etc\hosts if Windows.
Add ip.of.ur.sever domain.name.com line, save file and restart browser.

Put file at specific port on Localhost

I need to put a file at this address: http://localhost:51547/file.txt
What folder would I put it in on C:/?
Tony
If I understand your question correctly and you're trying to expose a file via the ASP.NET development server at that location (http://localhost:51547/file.txt) I'm afraid the answer is not quite to your liking.
Basically I don't think you can serve files from the root of the ASP.NET development server (i.e right after the localhost:port/ part - the port is automatically selected by ASP but you can also manually configure it). ASP.NET automatically creates a virtual application path right after localhost:por> and so you're most likely going to be limited to serving files from the virtual application folder. So, assuming you web application name is: "testApp", if you put a file called file.txt in the directory where you're storing the source code for "testApp" it will also become available when you're testing at: http://localhost:port/testApp/file.txt (note the testApp in between the host-name & port, and the file-name)
UPDATE
In light of you comment, here's something you could do. You could try to get a simple HTTP server installed on your development computer and have it serve files on a different port (say port 8000). In that case you would serve file.txt using this secondary HTTP server and it would be accessible at: http://localhost:8000/file.txt.
You could try to install Apache or use IIS which comes with Windows. For Apache, the quickest way to get it going would be to install a WAMP environment. You may also try Lighttpd, and also note that MySQL or PHP are not required at all if you're only serving static files.
Any folder you want. The port designator is specified in IIS itself.
http://support.microsoft.com/kb/149605
I suggest you that if you want to do a site(HTTP) is better to use the port 80 or to do a redirection for another port, remember too that localhoost is a loop back and also take a look at PortForward to check some ports that are used by specific applications and types of servers, and please improve your question.
Regards.

Resources