Valet returns 404 not found - laravel-valet

I'm trying to get Valet to work but all my sites return 404 - Not found.
My project folder is named Webb, inside is a folder named ogge. The path is ~/Desktop/Webb/ogge.
Valet is parked in my project folder, the ~/.config/valet/config.json contains the following:
{
"tld": "test",
"paths": [
"/Users/oscarbjurestrand/.config/valet/Sites",
"/Users/oscarbjurestrand/Desktop/Webb/ogge",
"/Users/oscarbjurestrand/Desktop/Webb"
]
}
I have linked the ogge project and valet links returns this:
These are the things I've tried
Restarted nginx and dnsmasq with brew services restart --all.
Reinstalled Valet, Composer and Brew.
Restarted my computer.
Restarted Valet.
brew services list returns ngninx, dnsmasq and php as started.
I can ping ogge.test without any issues.
I saw this issue and tried everything mentioned but without any luck.
What is wrong with my Valet?

You should add your website address to your hosts file, and it will work normally.
You can find the file under (for Lunix):
/etc/hosts
For Windows under:
C:\Windows\System32\drivers\etc\hosts
And add your records for your website like to the hosts file like:
127.0.0.1 ogge.test

Related

Laravel exception on WAMP windows server

I have installed a Laravel application on WAMP in a window server and I receive this error:
"Call to undefined function Illuminate\Encryption\openssl_cipher_iv_length()"
I cannot figure out the reason.
-- UPDATE --
I found out that MCrypt module is missing from the php extension folder, now the problem is how to install it :)
Solution 1:
Enable this extension (php_mcrypt.dll) in your php.ini file:
extension=php_mcrypt.dll
And then restart WAMP.
Solution 2:
For laravel look into config/app.php under 'cipher' and replace CRYPT_RIJNDAEL_128 with 'AES-128-CBC'
Make sure you update Wampserver, PHP AND Apache:
Exit running Wamp Server
From [Wamp][1]:
- Install the Visual c++ packages,
- Update Wamp Server
- Update PHP
- Update Apache
Switch to the newest PHP:
- Wamp TrayIcon->PHP->Version-> 7.x.x
Switch to the newest Apache Version
- Wamp TrayIcon->Apache->Version-> 2.x.x
Make enable extension=openssl in both php.ini files, php and apache directories

Vagrant for web server with shared folders: Apache breaks file permissions if it tries to stat a file before it exists

I'm not sure if this is an issue with vagrant, virtualbox or a configuration issue inside the box itsef, however:
Using the following setup: Apache is running in the guest with its server root set to /srv/http, this is a synched folder which points to ./public_html on the host.
While most of the time it works as expected, the following steps causes an issue
1) Navigate to a file that doesn't exist localhost:8080/test2.css -- shows a 404 error as expected but correctly connects to the guest which is serving the error
2) Create test2.css with some content and place it in public_html
3) Reload localhost:8080/test2.css -- Still shows a 404 error even though the file now exists
4) To debug, run vagrant ssh and then ls /srv/http. Which shows:
ls: cannot access test2.css: No such file or directory
So it's seeing the file, sort of but it shows without any permissions:
-????????? ? ? ? ? test2.css
-rw-rw-r-- 1 vagrant 7 Oct 23 11:13 test3.css
If I then re-save the file as test3.css, a file that hasn't yet been accessed it works perfectly. E.g. on the host, save the file I had open as test3.css and then navigate to it, it works as expected!
Any ideas? On why this might be?
In short: If apache has tried to read a file that doesn't exist, creating that file will then cause it to have invalid permissions. If apache has never tried to read the file before, it can be created and work as expected.
Thanks for any help, I'm really confused by this!
This turned out to be a kernel bug on the guest. Upgrading to 4.2.4 using the same Vagrant/Virtualbox/Guest Modules solved the issue.

Create local debian repository

My goal is to demonstrate creating a local debian repository with controlled versions of tools used (e.g. compiler versions) to make a build system more predictable.
I've tried to follow this example: http://linuxconfig.org/easy-way-to-create-a-debian-package-and-local-package-repository
but when I get to the apt-get update stage, I always get a 404 not found on the repository I've added.
The apache2 server is running, I can view the default page installed at http://localhost/html/index.html.
I am trying this with the file fortune-mod_1%3a1.99.1-7_amd64.deb installed to /var/www/debs. I create the Packages.gz file as the tutorial suggests:
dpkg-scanpackages debs /dev/null | gzip -9c > debs/Packages.gz
I also add a new file: /etc/apt/sources.list.d/myppa.list with this line:
deb http://localhost debs/
I restart the apache2 service just in case:
sudo service apache2 restart
but running:
sudo apt-get update
still produces this error:
W: Failed to fetch http://localhost/debs/Packages 404 Not Found
Is there something basic I'm missing? Ultimately, I'd like to get this working over a LAN, but first have to get it working on a single machine.
EDIT: I'm doing this on Ubuntu 14.04.
EDIT: Show contents of file /etc/apt/sources.list.d/myppa.list
tldr; use aptly
It's the easiest apt repository management tool I've found and it comes with neat tutorial showing how to create, populate, and publish your own apt repository.
References:
https://www.aptly.info/
https://www.aptly.info/tutorial/repo/
I ended up solving the problem. It was an issue with the default document root being different for the tutorial than on my system. All I did was move my debs folder to html (document root turns out to be /var/www/html, not just /var/www on my install). That did the trick.

Could not open configuration file /etc/apache2/apache2.conf: No such file or directory

I have just installed Ubuntu & starting with LAMP.
I installed it & it was working just fine till I installed uTorrent. Then after localhost was not opening & I tried with stopping apache & again restarting with it.
I used - sudo service apache2 restart
Now this error is coming - Could not open configuration file /etc/apache2/apache2.conf: No such file or directory
I checked there, there is no such file with this name.
Installed uTorrent is running on 8080 port...can it be problem ?
I really don't know what to do.
Is there an /etc/apache2/httpd.conf ?
If there is, have a look inside it and see what is being included i.e look for anything along the lines of:
Include /etc/apache2/apache2.conf
Basically there error is being thrown because of an incorrect pathname in a Include directive in a conf file

Phusion Passenger ngnix.conf location

I have a Rails 3 application that uses Phusion Passenger. I install the standalone version of Passenger using the command "gem install passenger" on my Macintosh MacBook Pro. The application works fine. Now, I want to change some configurations for the ngnix server but I can not find the location of the ngnix.conf file. I have looked in /usr/local and /opt/ and /etc/. Can someone assist me in either finding or creating the ngnix.conf?
Thanks
Look for the nginx.conf file in /opt/nginx/conf
You must have su privileges to edit this file.
Remember to stop and start nginx after making your changes